File tree Expand file tree Collapse file tree 1 file changed +31
-31
lines changed Expand file tree Collapse file tree 1 file changed +31
-31
lines changed Original file line number Diff line number Diff line change 22
33To quickly setup a local telemetry environment where OpenTelemetry data is sent to a local instance of Grafana LGTM:
441 .  start the [ Grafana LGTM docker image] ( https://hub.docker.com/r/grafana/otel-lgtm ) :
5-      ``` shell 
6-      docker run -p 3000:3000 -p 4317:4317 -p 4318:4318 --rm -ti grafana/otel-lgtm
7-      ```
5+ ``` shell 
6+ docker run -p 3000:3000 -p 4317:4317 -p 4318:4318 --rm -ti grafana/otel-lgtm
7+ ``` 
882 .  create a basic OpenTelemetry configuration file which will send data to the local instance of Grafana LGTM:
9-      ` ` ` yaml
10-      resource:
11-        attributes: 
12-          - name: service.name 
13-            value: my_app_name 
14-      tracer_provider:
15-        processors: 
16-          - simple: #  NOTE: you should use batch in production! 
17-              exporter: 
18-                otlp: 
19-                  protocol: grpc 
20-                  endpoint: http://localhost:4317 
21-      meter_provider:
22-        readers: 
23-          - periodic: 
24-              interval: 100 # 100 milliseconds, use something longer in production! 
25-              exporter: 
26-                otlp: 
27-                  protocol: grpc 
28-                  endpoint: http://localhost:4317 
29-      logger_provider:
30-        processors: 
31-          - simple: # NOTE: you should use batch in production! 
32-              exporter: 
33-                otlp: 
34-                  protocol: grpc 
35-                  endpoint: http://localhost:4317 
36-      ` ` ` 
9+ ``` yaml 
10+ resource :
11+   attributes :
12+     - name : service.name 
13+       value : my_app_name 
14+ tracer_provider :
15+   processors :
16+     - simple : #  NOTE: you should use batch in production!
17+         exporter :
18+           otlp :
19+             protocol : grpc 
20+             endpoint : http://localhost:4317 
21+ meter_provider :
22+   readers :
23+     - periodic :
24+         interval : 100  #  100 milliseconds, use something longer in production!
25+         exporter :
26+           otlp :
27+             protocol : grpc 
28+             endpoint : http://localhost:4317 
29+ logger_provider :
30+   processors :
31+     - simple : #  NOTE: you should use batch in production!
32+         exporter :
33+           otlp :
34+             protocol : grpc 
35+             endpoint : http://localhost:4317 
36+ ` ` ` 
37373. set the `  OTEL_EXPERIMENTAL_CONFIG_FILE` environment variable to the path of the configuration file: 
3838` export OTEL_EXPERIMENTAL_CONFIG_FILE=path/to/config.yaml` 
39394. start your application or tests 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments