Skip to content
This repository was archived by the owner on Aug 30, 2022. It is now read-only.

Bypass agent and send traces directly to collector? #165

Closed
jaegchoi opened this issue Aug 2, 2019 · 7 comments
Closed

Bypass agent and send traces directly to collector? #165

jaegchoi opened this issue Aug 2, 2019 · 7 comments

Comments

@jaegchoi
Copy link

jaegchoi commented Aug 2, 2019

Requirement - what kind of business use case are you trying to solve?

We are trying to use Envoy's Jaeger native tracing configuration (https://www.envoyproxy.io/docs/envoy/latest/start/sandboxes/jaeger_native_tracing) which uses this C++ client as a plugin. We have a remote secured Jaeger collector that we want to push traces to, but we don't have an agent. We would like to avoid having to set up a local agent as a sidecar, and be able to push our traces to the collector directly.

Problem - what in Jaeger blocks you from solving the requirement?

It looks like this client requires you to have an agent that will then send the traces to the collector. Is there a way to just configure a remote https reporter/collector so we can directly send spans to it?

Proposal - what do you suggest to solve the problem or improve the existing situation?

Some other Jaeger clients allow you to set an env variable JAEGER_ENDPOINT that allows spans to be directly submitted to the collector. https://www.jaegertracing.io/docs/1.13/client-features/

Any open questions to address

To summarize

This my current understanding of this client:

  • samplingServerURL is the collector endpoint where spans will finally end up
  • localAgentHostPort is the agent endpoint where the agent will pick up the spans and send along to the samplingServerURL
    We would like a way to bypass the agent and send spans directly to the collector
    If my understanding is wrong or if this is already possible please let me know
@mdouaihy
Copy link
Contributor

mdouaihy commented Sep 7, 2019

Hi @jaegchoi,

I think this will require to have an Http transport in the library to send the spans to the collector address (eg. "http://" + host + ":" + port + "/api/traces")

Do you think you can provide a PR for that?

mdouaihy added a commit to mdouaihy/jaeger-client-cpp that referenced this issue Sep 10, 2019
Support an HTTP Sender that allows to connect directly to a Collector.
For instance, authentication is not supported.

Signed-off-by: FR-MUREX-COM\mchaikhadouaihy <mehrez.douaihy@gmail.com>
mdouaihy added a commit to mdouaihy/jaeger-client-cpp that referenced this issue Sep 10, 2019
Support an HTTP Sender that allows to connect directly to a Collector.
For instance, authentication is not supported.

Signed-off-by: FR-MUREX-COM\mchaikhadouaihy <mehrez.douaihy@gmail.com>
mdouaihy added a commit to mdouaihy/jaeger-client-cpp that referenced this issue Sep 26, 2019
Support an HTTP Sender that allows to connect directly to a Collector.
For instance, authentication is not supported.

Signed-off-by: FR-MUREX-COM\mchaikhadouaihy <mehrez.douaihy@gmail.com>
yurishkuro pushed a commit that referenced this issue Sep 29, 2019
* Add an HTTP Sender (#165)

Support an HTTP Sender that allows to connect directly to a Collector.
For instance, authentication is not supported.

Signed-off-by: FR-MUREX-COM\mchaikhadouaihy <mehrez.douaihy@gmail.com>

* * Rename Http/UDP senders to Http/UDP Transporters
* Rename ThriftTransporter to ThriftSender
* Add Integration Test for http

Signed-off-by: FR-MUREX-COM\mchaikhadouaihy <mehrez.douaihy@gmail.com>

* Make HTTP capital to be inline with UDP.

Signed-off-by: FR-MUREX-COM\mchaikhadouaihy <mehrez.douaihy@gmail.com>
@mdouaihy
Copy link
Contributor

Hi @yurishkuro, I think we can close this issue.

@yurishkuro
Copy link
Member

maybe we need a new release before closing?

@a-sharma11
Copy link

Is the release coming soon for this feature?

@a-sharma11
Copy link

a-sharma11 commented Oct 18, 2019

Seems bit misleading here. From the documentation seems like its possible with the current version?
https://github.com/jaegertracing/jaeger-client-cpp#connecting-directly-to-the-collector

nm i see it in one of the commits

@DanTulovsky
Copy link

Should this be working now with version 0.6.0? My config is below, but I don't see any traces showing up...

(I do have traces from other apps, unrelated to this tracer...)

    {
      "service_name": "nginx",
      "sampler": {
        "type": "const",
        "param": 100
      },
      "reporter": {
        "logSpans": true,
        "endpoint": "http://linkerd-collector.linkerd:14268/api/traces"
      },
      "headers": {
        "jaegerDebugHeader": "jaeger-debug-id",
        "jaegerBaggageHeader": "jaeger-baggage",
        "traceBaggageHeaderPrefix": "uberctx-"
      },
      "baggage_restrictions": {
        "denyBaggageOnInitializationFailure": false,
        "hostPort": ""
      },
    }

@DanTulovsky
Copy link

nginx conf has:

   ...
    load_module modules/ngx_http_opentracing_module.so;
   ...
    http {
        # tracing
        opentracing_load_tracer /usr/local/lib/libjaegertracing_plugin.so /etc/jaeger-nginx-config.json;
        opentracing on;
        opentracing_tag http_user_agent $http_user_agent;
       ...
    }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants