Skip to content

Commit

Permalink
get name from scope instead from policy name (#2328)
Browse files Browse the repository at this point in the history
get name from scope instead from policy name (#2328)
  • Loading branch information
leoparente authored Apr 26, 2023
1 parent 11975ae commit 0166ab8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion agent/otel/otlpmqttexporter/otlp.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ func (e *baseExporter) pushAllMetrics(ctx context.Context, md pmetric.Metrics) e
scopes := pmetricotlp.NewExportRequestFromMetrics(md).Metrics().ResourceMetrics().At(0).ScopeMetrics()
for i := 0; i < scopes.Len(); i++ {
scope := scopes.At(i)
policyName := e.extractScopeAttribute(scope, "policy")
policyName := scope.Scope().Name()
agentData, err := e.config.OrbAgentService.RetrieveAgentInfoByPolicyName(policyName)
if err != nil {
e.logger.Warn("Policy is not managed by orb", zap.String("policyName", policyName))
Expand Down

0 comments on commit 0166ab8

Please sign in to comment.