Skip to content

Question on flow mode / River syntax for parsing Faro agent logs #6295

Closed Answered by titaneric
davisford asked this question in Q&A
Discussion options

You must be logged in to vote

Following river script should meet your need.

Note that I use multiple pipelines to process the faro SDK log.
First, I add additional labels for faro SDK with app_name, app_environment, and source.
Then, I match app_name="frontend" and extract kind into new labels.
At last, I match kind="log" to extract your JSON message, and extract to new labels, too.

logging {
    level  = "debug"
    format = "logfmt"
}

faro.receiver "default" {    
    server {
        listen_address = "0.0.0.0"
        listen_port = "12347"
        cors_allowed_origins = ["*"]
    }
    
    extra_log_labels = {
        app_name = "frontend",
        app_environment = "dev",
        source = "faro-sdk",
    }
    
…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by davisford
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants