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

docs: OpenTelemetry Elastic exporter #3845

Merged
merged 10 commits into from
Jun 8, 2020

Conversation

bmorelli25
Copy link
Member

@bmorelli25 bmorelli25 commented Jun 4, 2020

Motivation/summary

This PR adds initial documentation for the OpenTelemetery collector Elastic exporter. I ended up providing a lot more detail than I expected--mostly because the official OT docs are still quite light.

I think it'd be nice to add a quick start or docker demo as an example.

Any and all feedback is welcome.

Documentation preivew

Click here to see a doc preview 🚀

Notes

I've used two different setups to play around with this integration. The first only kind of worked:
Jaeger hot rod --> Jaeger Agent --> Jaeger oltp collector --> Otel Collector --> ESS. I was able to get traces into ES, but I don't think the Otel collector liked the formatting of http.url from Jaeger hot rod demo.

I then altered the OpenTelemetry demo app to use the zipkin sleuth webmvc example app --> Otel collector --> ESS. Super basic, but it worked nicely. You can see the dockerfile/compose/etc., here.
Screen Shot 2020-06-04 at 12 11 45 PM

@cyrille-leclerc gave me access to his demo application, so I'll give that a shot tonight or tomorrow as well.

To do

  • Real architecture diagram instead of my text-based version
    open-telemetry-elastic-arch

  • Define IDs for all headers

- [ ] Quickstart?

Related issues

Closes elastic/apm#269.

@bmorelli25 bmorelli25 added the docs label Jun 4, 2020
@bmorelli25 bmorelli25 requested a review from axw June 4, 2020 23:25
@bmorelli25 bmorelli25 self-assigned this Jun 4, 2020
@apmmachine
Copy link
Contributor

apmmachine commented Jun 4, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #3845 updated]

  • Start Time: 2020-06-08T17:13:17.126+0000

  • Duration: 47 min 31 sec

Test stats 🧪

Test Results
Failed 0
Passed 3204
Skipped 146
Total 3350

Steps errors

Expand to view the steps failures

  • Name: Run Window tests
    • Description:

    • Duration: 7 min 26 sec

    • Start Time: 2020-06-08T17:31:12.680+0000

    • log

@axw
Copy link
Member

axw commented Jun 5, 2020

I've used two different setups to play around with this integration. The first only kind of worked:
Jaeger hot rod --> Jaeger Agent --> Jaeger oltp collector --> Otel Collector --> ESS. I was able to get traces into ES, but I don't think the Otel collector liked the formatting of http.url from Jaeger hot rod demo.

What do you mean it didn't like it? Were there errors? Dropped transaction/spans?

@bmorelli25
Copy link
Member Author

I've used two different setups to play around with this integration. The first only kind of worked:
Jaeger hot rod --> Jaeger Agent --> Jaeger oltp collector --> Otel Collector --> ESS. I was able to get traces into ES, but I don't think the Otel collector liked the formatting of http.url from Jaeger hot rod demo.

What do you mean it didn't like it? Were there errors? Dropped transaction/spans?

Ah, sorry.

This, repeated:

otel-collector_1    | 2020-06-05T02:56:37.310Z  WARN    queuedprocessor/queued_processor.go:190 Sender failed   {"component_kind": "processor", "component_type": "queued_retry", "component_name": "queued_retry", "error": "[parse \"0.0.0.0:8083\": first path segment in URL cannot contain colon; parse \"0.0.0.0:8083\": first path segment in URL cannot contain colon; parse \"0.0.0.0:8083\": first path segment in URL cannot contain colon; parse \"0.0.0.0:8083\": first path segment in URL cannot contain colon; parse \"0.0.0.0:8083\": first path segment in URL cannot contain colon; parse \"0.0.0.0:8083\": first path segment in URL cannot contain colon; parse \"0.0.0.0:8083\": first path segment in URL cannot contain colon; parse \"0.0.0.0:8083\": first path segment in URL cannot contain colon; parse \"0.0.0.0:8083\": first path segment in URL cannot contain colon; parse \"0.0.0.0:8083\": first path segment in URL cannot contain colon]"}
otel-collector_1    | go.opentelemetry.io/collector/processor/queuedprocessor.(*queuedSpanProcessor).processItemFromQueue
otel-collector_1    |   /go/pkg/mod/go.opentelemetry.io/[email protected]/processor/queuedprocessor/queued_processor.go:190
otel-collector_1    | go.opentelemetry.io/collector/processor/queuedprocessor.(*queuedSpanProcessor).Start.func1
otel-collector_1    |   /go/pkg/mod/go.opentelemetry.io/[email protected]/processor/queuedprocessor/queued_processor.go:86
otel-collector_1    | github.com/jaegertracing/jaeger/pkg/queue.(*BoundedQueue).StartConsumers.func1
otel-collector_1    |   /go/pkg/mod/github.com/jaegertracing/[email protected]/pkg/queue/bounded_queue.go:77
otel-collector_1    | 2020-06-05T02:56:37.310Z  WARN    queuedprocessor/queued_processor.go:202 Failed to process batch, re-enqueued    {"component_kind": "processor", "component_type": "queued_retry", "component_name": "queued_retry", "batch-size": 33}
otel-collector_1    | go.opentelemetry.io/collector/processor/queuedprocessor.(*queuedSpanProcessor).processItemFromQueue
otel-collector_1    |   /go/pkg/mod/go.opentelemetry.io/[email protected]/processor/queuedprocessor/queued_processor.go:202
otel-collector_1    | go.opentelemetry.io/collector/processor/queuedprocessor.(*queuedSpanProcessor).Start.func1
otel-collector_1    |   /go/pkg/mod/go.opentelemetry.io/[email protected]/processor/queuedprocessor/queued_processor.go:86
otel-collector_1    | github.com/jaegertracing/jaeger/pkg/queue.(*BoundedQueue).StartConsumers.func1
otel-collector_1    |   /go/pkg/mod/github.com/jaegertracing/[email protected]/pkg/queue/bounded_queue.go:77
otel-collector_1    | 2020-06-05T02:56:37.310Z  WARN    queuedprocessor/queued_processor.go:208 Backing off before next attempt {"component_kind": "processor", "component_type": "queued_retry", "component_name": "queued_retry", "backoff_delay": "5s"}
otel-collector_1    | go.opentelemetry.io/collector/processor/queuedprocessor.(*queuedSpanProcessor).processItemFromQueue
otel-collector_1    |   /go/pkg/mod/go.opentelemetry.io/[email protected]/processor/queuedprocessor/queued_processor.go:208
otel-collector_1    | go.opentelemetry.io/collector/processor/queuedprocessor.(*queuedSpanProcessor).Start.func1
otel-collector_1    |   /go/pkg/mod/go.opentelemetry.io/[email protected]/processor/queuedprocessor/queued_processor.go:86
otel-collector_1    | github.com/jaegertracing/jaeger/pkg/queue.(*BoundedQueue).StartConsumers.func1
otel-collector_1    |   /go/pkg/mod/github.com/jaegertracing/[email protected]/pkg/queue/bounded_queue.go:77

But I was able to receive data in ESS. Lots of spans though:

Click to expand screenshot

screencapture-e67ec6ab6f164dd899d8704a14703b67-us-central1-gcp-cloud-es-io-9243-app-apm-2020-06-04-19_48_02

I just figured it was user error or Jaeger not playing nicely with Otel. If you want to try it out, here's the docker-compose. docker-compose up. Then head to localhost:8080 to click some buttons.

Copy link
Member

@axw axw left a comment

Choose a reason for hiding this comment

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

Looks good overall! Just a handful of comments, nothing major.

I'll have a look at what's going on with Jaeger/HotROD data, sounds like a bug in the exporter. Thanks for highlighting that issue.

docs/guide/opentelemetry-elastic.asciidoc Show resolved Hide resolved
docs/guide/opentelemetry-elastic.asciidoc Outdated Show resolved Hide resolved
docs/guide/opentelemetry-elastic.asciidoc Outdated Show resolved Hide resolved
docs/guide/opentelemetry-elastic.asciidoc Outdated Show resolved Hide resolved
docs/guide/opentelemetry-elastic.asciidoc Outdated Show resolved Hide resolved
docs/guide/opentelemetry-elastic.asciidoc Outdated Show resolved Hide resolved
@axw
Copy link
Member

axw commented Jun 5, 2020

I've made a change to the exporter to gracefully handle the http.url values that the OpenTracing instrumentation is recording: open-telemetry/opentelemetry-collector-contrib#285. Thanks for picking that up!

Copy link
Member

@axw axw left a comment

Choose a reason for hiding this comment

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

Looks great, thank you!

@codecov-commenter
Copy link

Codecov Report

Merging #3845 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #3845   +/-   ##
=======================================
  Coverage   79.70%   79.70%           
=======================================
  Files         135      135           
  Lines        6158     6158           
=======================================
  Hits         4908     4908           
  Misses       1250     1250           

@bmorelli25 bmorelli25 merged commit a517fe6 into elastic:master Jun 8, 2020
@bmorelli25 bmorelli25 deleted the open-telemetry branch June 8, 2020 18:25
bmorelli25 added a commit to bmorelli25/apm-server that referenced this pull request Jun 8, 2020
bmorelli25 added a commit to bmorelli25/apm-server that referenced this pull request Jun 8, 2020
bmorelli25 added a commit to bmorelli25/apm-server that referenced this pull request Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document Elastic OpenTelemetry Collector Exporter
5 participants