Closed PaulBenn-UnlikelyAI closed 3 years ago
Try adding [batch]
to processors
in your config?
Hi @Izchen, I've tried this configuration with ([]
) and without ([batch]
), but the result is the same.
@PaulBenn-UnlikelyAI You also added a
processors:
batch:
section?
@Izchen yes, that's correct. I've also played around with multiple variations of the batch processor's settings, including limiting the batch size to 1.
I ran the example (verbatim) in my local environment and the span is printed successfully.
I have the following in my otel-collector-config.yaml
receivers:
otlp:
protocols:
grpc:
exporters:
logging:
loglevel: debug
processors:
batch:
service:
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [logging]
as well as docker-compose-yml
version: "2"
services:
otel-collector:
image: otel/opentelemetry-collector-dev:latest
command: ["--config=/etc/otel-collector-config.yaml", "${OTELCOL_ARGS}"]
volumes:
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
ports:
- "4317:4317" # OTLP gRPC receiver
Simply running docker-compose up
works with this example.
Hi @Izchen, this is using a different image. I am using a Dockerfile
with:
FROM otel/opentelemetry-collector-contrib:0.29.0
...whereas you are using a docker-compose
file with:
image: otel/opentelemetry-collector-dev:latest
Could you please clarify the relationship between these images, and their difference to the AWS version, if applicable? I cannot find any relevant comparison documentation, and it would be good to have an official recommendation from you!
@PaulBenn-UnlikelyAI
Our getting started docs point to using the latest version of opentelemetry-collector (not contrib).
Thanks - I had a brief look just now, and I'll try this tomorrow, but could you please clarify the relationship between opentelemetry-collector-contrib
, opentelemetry-collector-dev
and opentelemetry-collector
?
I would ask this in the OpenTelemetry collector repository.
Hi @Izchen. I have confirmed that your example above works perfectly with opentelemetry-collector-dev:latest
and the span is printed by the logging exporter, as expected. I am still quite confused as to the relationship between these three images, so I have opened
https://github.com/open-telemetry/opentelemetry-collector/issues/3669#issue-947099130
In the OTel Collector repository. Thank you for your help, and feel free to resolve this issue.
Environment
Steps to reproduce Set up a client:
pipenv
project.Pipfile
as follows:[packages] opentelemetry-api = "" opentelemetry-sdk = "" opentelemetry-exporter-otlp = "*"
zpages
is not necessary, but aids the example):Send a metric:
What is the expected behavior? Given that this is the official example on the documentation, I expect it to work without any additional configuration:
foo
is created and instantly ended.foo
is emitted from clientOTLPSpanExporter
.foo
reaches collector.logging
exporter prints it out.zpages
reflects the span.:8888
reflects the span.What is the actual behavior?
foo
is created and instantly ended.foo
is either not emitted correctly from clientOTLPSpanExporter
, or not emitted at all. Adding aSimpleSpanProcessor(ConsoleSpanExporter())
prints it.foo
never reaches collector. Only a span of nameopentelemetry.proto.collector.trace.v1.TraceService.Export
reaches collector.logging
exporter never prints the above (intermediate?) span out.zpages
reflects the above span asRunning
. This state never changes.:8888
does not reflect the span.Additional context This is a verbatim example from various pieces of documentation, wrapped in a thin
pipenv
layer. Am I doing something wrong? If not, it would be good if we could update the documentation to reflect an example which works out of the box