OTPL->OTLP: How to work with nested attributes (rewrite_tag) #10076
              
                Unanswered
              
          
                  
                    
                      nortenorte
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 0 comments
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
How does the syntax for nested OTLP look like.
We want to set a tag based on which service sent the data. We think rewrite_tag would be the easiest way to accomplish this. We want to look at service.name and if it is my.service set a TAG.
{"resource_logs":[{"resource":{"attributes":[{"key":"service.name", "value":{"string_value":"my.service"}}]},
However we don't know how the syntax for this would work. Below is an example how it work if we look in a field in the "first level". See our example below
fluent-bit_stdout_otlp.yaml
Install protocurl: https://github.com/qaware/protocurl
Use protocurl to send example standard otlp metric message. (https://github.com/open-telemetry/opentelemetry-proto)
Start of the example (full example opentelemetry-proto/examples/logs.json )
Beta Was this translation helpful? Give feedback.
All reactions