Skip to content

Commit

Permalink
Merge pull request #11 from thinkingabouther/fix-resource-in-metrics
Browse files Browse the repository at this point in the history
fix: add OTEL resource info to metrics
  • Loading branch information
dhontecillas authored Apr 9, 2024
2 parents 497adaa + ec591e0 commit 306bbfc
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 306bbfc

Please sign in to comment.