Skip to content

Commit

Permalink
OTLP: Move policy name to attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
leoparente committed Nov 1, 2023
1 parent 167a0b1 commit 3e42059
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/CoreServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,9 @@ void CoreServer::_setup_routes(const PrometheusConfig &prom_config)
try {
auto [policy, lock] = _registry->policy_manager()->module_get_locked(p_mname);
auto scope = resource.add_scope_metrics();
scope->mutable_scope()->set_name(p_mname);
auto attr = scope->mutable_scope()->add_attributes();
attr->set_key("policy_name");
attr->mutable_value()->set_string_value(p_mname);
policy->opentelemetry_metrics(*scope);
} catch (const std::exception &) {
return false;
Expand Down

0 comments on commit 3e42059

Please sign in to comment.