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

Tracing Envoy with consul-envoy:v1.11.2-v1.20.1 #62

Open
mlindes opened this issue Feb 23, 2022 · 5 comments
Open

Tracing Envoy with consul-envoy:v1.11.2-v1.20.1 #62

mlindes opened this issue Feb 23, 2022 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@mlindes
Copy link

mlindes commented Feb 23, 2022

The Datadog example config does not work with the xDS v3 syntax used in later versions like consul-envoy:v1.11.2-v1.20.1
I've managed to sort out some syntax to capture traces, but I'm still not able to see the Envoy spans. Not sure where I'm going wrong. I'd love to see a working example of this

For the tracing json, I'm using:

  envoy_tracing_json = <<EOL
  {
    "http": {
      "name": "envoy.tracers.datadog",
      "typed_config": {
        "@type": "type.googleapis.com/envoy.config.trace.v3.DatadogConfig",
        "collector_cluster": "datadog_8126",
        "service_name": "envoy"
      }
    }
  }
  EOL

This allows traces to be captured from the services, but not envoy.

@nicholasjackson
Copy link
Owner

Hey @mlindes, let me look into this that example is quite old there but the tracing should work with later envoy versions. As you correctly state it will be a case of updating to change the deprecated v2 syntax. Might take me a couple of days before I get to this but will definitely have this updated by the weekend.

@nicholasjackson nicholasjackson added the bug Something isn't working label Feb 24, 2022
@nicholasjackson nicholasjackson self-assigned this Feb 24, 2022
@nicholasjackson
Copy link
Owner

Hey @mlindes, let me look into this that example is quite old there but the tracing should work with later envoy versions. As you correctly state it will be a case of updating to change the deprecated v2 syntax. Might take me a couple of days before I get to this but will definitely have this updated by the weekend.

@mlindes
Copy link
Author

mlindes commented Mar 1, 2022

Hey @nicholasjackson - just some followup....
Using your consul-demo-tracing repo with the envoy_tracing_json config noted above & some updates to datadog env vars, I am able to see envoy spans. Interestingly enough, though, I'm not able to reproduce this in ECS Fargate. I'll follow-up on that elsewhere, but would welcome any input you have regarding passing the envoy config as a value for CONSUL_LOCAL_CONFIG to the envoy container.

@nicholasjackson
Copy link
Owner

@mlindes I am really sorry for the late reply, my Github notifications are a mess.

Are you using Consul ECS?

https://www.consul.io/docs/ecs

If so you can pass that config using the Proxy Defaults configuration entry.

https://www.consul.io/docs/connect/config-entries/proxy-defaults

If you are manually starting the Envoy proxy using the consul connect envoy command this would work too.

Note: You need to set the proxy-defaults before creating the proxy, tracing settings are a bootstrap setting I think, and are not hot updated.

@mlindes
Copy link
Author

mlindes commented Jun 7, 2022

Sorry for such a slow turnaround on my side.
First, to answer the questions

  1. yes, we're using consul ecs
  2. testing both - local & with proxy defaults. By "locally", I mean we were passing the proxy config as a json blob in CONSUL_LOCAL_CONFIG with envoy_public_listener_json envoy_tracing_json & envoy_extra_static_clusters_json vars specified. It's json inside json of env vars inside an env var. No fun :)

But we solved the problem. The main issue is that services registered need to be registered in consul as http services, by default they were being registered as tcp services. While they services still performed their functions well, the tracing filters were not being applied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants