Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Backport of Add emit_tags_as_labels to envoy bootstrap config when using Consul Telemetry Collector into release/1.15.x #17900

Conversation

hc-github-team-consul-core
Copy link
Contributor

Backport

This PR is auto-generated from #17888 to be assessed for backporting due to the inclusion of the label backport/1.15.

The below text is copied from the body of the original PR.


Description

This flips an Envoy flag on so metrics sent to the Consul Telemetry Collector get all the tags that we create via regexes:

func resourceTagSpecifiers(omitDeprecatedTags bool) ([]string, error) {

Testing & Reproduction steps

I made this change directly to consul-dataplane, deployed it to a personal Docker Hub repo, and ran consul-k8s install with it:

consul-k8s install -preset cloud -hcp-resource-id "$HCP_RESOURCE_ID" -demo \
    --set="global.enterpriseLicense.secretKey=key" \
    --set="global.enterpriseLicense.secretName=consul-license" \
    --set="global.logLevel=debug" \
    --set="global.imageConsulDataplane=jjtimmons/consul-dataplane:latest" \
    --set="metrics.enableTelemetryCollector=true" \
    --set="peering.enabled=true" \
    --set="server.replicas=3"

Checked Prometheus and we're getting all the labels:

{name="http_downstream_rq_active", cluster="josh-test-envoy-emit-tags-labels", consul_source_datacenter="josh-test-envoy-emit-tags-labels", consul_source_namespace="default", consul_source_partition="default", consul_source_service="frontend", consul_upstream_datacenter="josh-test-envoy-emit-tags-labels", consul_upstream_namespace="default", consul_upstream_partition="default", consul_upstream_service="consul-telemetry-collector", envoy_cluster="frontend", envoy_http_conn_manager_prefix="upstream", hcp_internal_id="00000000-e387-6f3e-286b-bc6f1e1b4f84", hcp_organization_id="00000000-06f2-45b3-96ba-e4b0ced62717", hcp_project_id="0000000-0087-4a1b-a9d6-b6030d55ea5c", local_cluster="frontend", namespace="default", node_id="frontend-f74f5f4d4-cw72z-frontend-sidecar-proxy", partition="default"}

Links

Envoy docs: https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/metrics/v3/metrics_service.proto

If true, metrics will have their tags emitted as labels on the metrics objects sent to the MetricsService, and the tag extracted name will be used instead of the full name, which may contain values used by the tag extractor or additional tags added during stats creation.

PR Checklist

  • updated test coverage
  • external facing docs updated
  • appropriate backport labels added
  • not a security concern

Overview of commits

@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/jjtimmons/config-envoy-tags-as-labels/vaguely-trusty-monarch branch 2 times, most recently from 409c1bc to e121cc4 Compare June 27, 2023 16:35
@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/jjtimmons/config-envoy-tags-as-labels/vaguely-trusty-monarch branch from 9384a7a to 835e61d Compare June 27, 2023 16:35
Copy link

Choose a reason for hiding this comment

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

Auto approved Consul Bot automated PR

@github-actions github-actions bot added the theme/cli Flags and documentation for the CLI interface label Jun 27, 2023
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging June 27, 2023 16:38 Inactive
@hc-github-team-consul-core hc-github-team-consul-core merged commit e72edb4 into release/1.15.x Jun 27, 2023
@hc-github-team-consul-core hc-github-team-consul-core deleted the backport/jjtimmons/config-envoy-tags-as-labels/vaguely-trusty-monarch branch June 27, 2023 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/cli Flags and documentation for the CLI interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants