Skip to content

Commit

Permalink
fix: add OTEL resource info to metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkingabouther committed Apr 2, 2024
1 parent 0446a43 commit ec591e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ In the `docker_compose` folder there is the environment to run the observability

```
make image
cd docker-compose && make up
cd docker_compose && make up
```

## Run local krakend instances and other services in docker compose
Expand Down
1 change: 1 addition & 0 deletions state/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ func NewWithVersion(serviceName string, cfg *OTELStateConfig, version string,
var meterProvider metric.MeterProvider = noopmetric.NewMeterProvider()
var sdkMeterProvider *sdkmetric.MeterProvider
if len(metricOpts) > 0 {
metricOpts = append(metricOpts, sdkmetric.WithResource(res))
sdkMeterProvider = sdkmetric.NewMeterProvider(metricOpts...)
meterProvider = sdkMeterProvider
}
Expand Down

0 comments on commit ec591e0

Please sign in to comment.