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

AnyValue #1363

Closed
obecny opened this issue Jul 15, 2020 · 1 comment
Closed

AnyValue #1363

obecny opened this issue Jul 15, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@obecny
Copy link
Member

obecny commented Jul 15, 2020

Steps to reproduce

  1. Get latest version for example 71392e5d543eca6e895d852c9bad122b18ae7b23
  2. Try to send span with attributes converted to latest proto format using AnyValue for example
{ key: 'service.name', value: { stringValue: 'basic-service' } }

What did you expect to see?
I expect to see the span in zipkin

What did you see instead?

  1. For grpc it works fine
  2. For json over http it doesn't
  3. For proto over http it doesn't

What version did you use?
https://hub.docker.com/r/otel/opentelemetry-collector-dev/tags
71392e5d543eca6e895d852c9bad122b18ae7b23

What config did you use?

version: "3"
services:
  # Collector
  collector:
#    image: otel/opentelemetry-collector-dev:2ba9cdcc2b3c7f45288c1152b97e9ec64b9d6706
    image: otel/opentelemetry-collector-dev:71392e5d543eca6e895d852c9bad122b18ae7b23
#    image: otel/opentelemetry-collector-dev:latest
#    image: otel/opentelemetry-collector:latest
    command: ["--config=/conf/collector-config.yaml", "--log-level=DEBUG"]
    networks:
      - otelcol
    volumes:
      - ./collector-config.yaml:/conf/collector-config.yaml
    ports:
      - "55680:55680"
    depends_on:
      - zipkin-all-in-one

  # Zipkin
  zipkin-all-in-one:
    image: openzipkin/zipkin:latest
    networks:
      - otelcol
    ports:
      - "9411:9411"

networks:
  otelcol:
receivers:
  otlp:
    protocols:
      grpc:
      http:

exporters:
  zipkin:
    endpoint: "http://zipkin-all-in-one:9411/api/v2/spans"

processors:
  batch:
  queued_retry:

service:
  pipelines:
    traces:
      receivers: [otlp]
      exporters: [zipkin]
      processors: [batch, queued_retry]

Environment
Docker container, osx

Additional context

I'm getting error
code: HPE_INVALID_CONSTANT
reason: Expected HTTP/

  1. For Json over http
    'Content-Type': 'application/json'

  2. For Proto over http
    'Content-Type': 'application/x-protobuf'

Collector url: http://localhost:55680/v1/trace

@obecny obecny added the bug Something isn't working label Jul 15, 2020
@obecny
Copy link
Member Author

obecny commented Jul 16, 2020

WIth latest docker 0.6.0. (just released) and changes in configuration I was able to test this correctly;

@obecny obecny closed this as completed Jul 16, 2020
MovieStoreGuy pushed a commit to atlassian-forks/opentelemetry-collector that referenced this issue Nov 11, 2021
)

* Enable support for externally-defined ID generators

* Moved the SDK's `internal.IDGenerator` interface to the `sdk/trace`
package.
* Added `trace.WithIDGenerator()` `TracerProviderOption`.

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Update CHANGELOG.md with PR info

* Address PR feedback:

* Fix IDGenerator godoc comment
* rename type defaultIDGenerator to randomIDGenerator
* rename defIDGenerator() to defaultIDGenerator()

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Rework trace.IDGenerator interface

* NewTraceID() -> NewIDs(ctx)
** Returns both TraceID and SpanID
* NewSpanID() -> NewSpanID(ctx, traceID)
** Returns only SpanID, has access to TraceID
* Both methods now receive a context, from which they may extract
information
* startSpanInternal() updated to receive a context to pass to the ID
generator

* Drop outdated comment from docblock

Co-authored-by: Krzesimir Nowak <qdlacz@gmail.com>

Co-authored-by: Krzesimir Nowak <qdlacz@gmail.com>
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

1 participant