Skip to content

Add span metrics filter policies to user-configurable overrides api#2906

Merged
yvrhdn merged 1 commit intografana:mainfrom
rlankfo:rlankfo/filter-policies
Sep 8, 2023
Merged

Add span metrics filter policies to user-configurable overrides api#2906
yvrhdn merged 1 commit intografana:mainfrom
rlankfo:rlankfo/filter-policies

Conversation

@rlankfo
Copy link
Copy Markdown
Member

@rlankfo rlankfo commented Sep 8, 2023

What this PR does:

Extends the user-configurable overrides added in #2543 with spanmetrics filter policies override.

New JSON Payload example:

{
    "forwarders": [],
    "metrics_generator": {
        "processors": [
            "service-graphs",
            "span-metrics"
        ],
        "disable_collection": false,
        "processor": {
            "service_graphs": {
                "dimensions": [
                    "service.namespace"
                ],
                "enable_client_server_prefix": true,
                "peer_attributes": [
                    "peer.service",
                    "db.name",
                    "db.system",
                    "db.url"
                ]
            },
            "span_metrics": {
                "dimensions": [
                    "service.namespace"
                ],
                "enable_target_info": true,
                "filter_policies": [
                    {
                        "include": {
                            "match_type": "strict",
                            "attributes": [
                                {
                                    "key": "span.kind",
                                    "value": "SPAN_KIND_SERVER"
                                }
                            ]
                        }
                    },
                    {
                        "include": {
                            "match_type": "strict",
                            "attributes": [
                                {
                                    "key": "span.kind",
                                    "value": "SPAN_KIND_CLIENT"
                                }
                            ]
                        }
                    }
                ]
            }
        }
    }
}

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: Robbie Lankford <robert.lankford@grafana.com>
@rlankfo rlankfo force-pushed the rlankfo/filter-policies branch from bdab166 to 02aa7a5 Compare September 8, 2023 02:33
Copy link
Copy Markdown
Contributor

@yvrhdn yvrhdn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@yvrhdn yvrhdn merged commit d943d78 into grafana:main Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants