Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

rlankfo
Copy link
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
Member

@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
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants