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

Zipkin exporter doesn't retain the recorded error of a otlp span #8187

Closed
atye opened this issue Mar 1, 2022 · 2 comments
Closed

Zipkin exporter doesn't retain the recorded error of a otlp span #8187

atye opened this issue Mar 1, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@atye
Copy link

atye commented Mar 1, 2022

Describe the bug
The zipkin exporter does not retain the recorded error of a span from the otlp receiver. This could be an issue with https://github.com/open-telemetry/opentelemetry-go but I'm trying here first.

Steps to reproduce
Run Zipkin instance.
Run Collector configured to receive otlp via http or grpc and export to Zipkin instance.
Create a OTLP client and create a span with a recorded error (see config section for example, included Jaeger for comparison)

What did you expect to see?
Zipkin instance shows traces that contain spans with recorded errors and are marked red.

What did you see instead?
Zipkin instance shows traces that contain spans without recorded errors that are not marked red.

What version did you use?
Version: 0.45.0

What config did you use?

receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:7000
      http:
        endpoint: 0.0.0.0:7001

exporters:
  jaeger:
    endpoint: "jaeger:14250"
    tls:
      insecure: true
  zipkin:
    endpoint: "http://zipkin:9411/api/v2/spans"

processors:
  batch:

service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [zipkin,jaeger]
version: "3.7"
services:
  zipkin:
    image: openzipkin/zipkin:2.23.16
    ports:
      - "9411:9411"
  jaeger:
    image: jaegertracing/all-in-one:1.31
    ports:
      - "14268:14268"
      - "16686:16686"
      - "14250:14250"
      - "6831:6831/udp"
  otel-collector:
    image: otel/opentelemetry-collector-contrib:latest
    command: ["--config=/etc/otel-collector-config.yaml"]
    volumes:
      - ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
    ports:
    - "9211:9211"
    - "7000:7000"
    - "7001:7001"
    - "7002:7002"
    depends_on:
      - zipkin
      - jaeger 
package main

import (
	"context"
	"errors"
	"log"

	"go.opentelemetry.io/otel"
	"go.opentelemetry.io/otel/codes"
	"go.opentelemetry.io/otel/exporters/otlp/otlptrace"
	"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp"
	sdktrace "go.opentelemetry.io/otel/sdk/trace"
)

func main() {
	o, err := otlptrace.New(context.Background(), otlptracehttp.NewClient(otlptracehttp.WithEndpoint("localhost:7001"), otlptracehttp.WithInsecure()))
	if err != nil {
		log.Fatal(err)
	}

	tracerOptions := []sdktrace.TracerProviderOption{
		sdktrace.WithBatcher(o),
		sdktrace.WithSampler(sdktrace.TraceIDRatioBased(1)),
	}

	otel.SetTracerProvider(sdktrace.NewTracerProvider(tracerOptions...))

	t := otel.Tracer("test")

	_, span := t.Start(context.Background(), "test")

	err = errors.New("error")
	span.RecordError(err)
	span.SetStatus(codes.Error, err.Error())

	span.End()

	select {}
}

Environment
OS: CentOS 7.6

Additional context
Add any other context about the problem here.

@atye atye added the bug Something isn't working label Mar 1, 2022
@jpkrohling
Copy link
Member

cc @pmm-sumo

@pmm-sumo
Copy link
Contributor

This should be closed through #8253. If anyone sees the issue happening again, please reopen

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

3 participants