Commit Graph

13 Commits

Author SHA1 Message Date
Zechun Chen
b944b108df Clean up repeated package import
Signed-off-by: Zechun Chen <zechun.chen@daocloud.io>
2023-02-10 16:21:55 +08:00
Akihiro Suda
5082fb3958
go.mod: go.opentelemetry.io/otel v1.12.0
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-01-30 08:40:46 +09:00
Tony Fang
8472946799 Adding unit tests to opentelemetry tracing
Refractor newExporter and newTracer, add unit tests to them
This PR is part of issue 7493

Signed-off-by: Tony Fang <nenghui.fang@gmail.com>
2022-12-06 03:14:06 +00:00
Luca Comellini
b829e6f2d3
Bump OpenTelemetry to v1.11.1
Signed-off-by: Luca Comellini <luca.com@gmail.com>
2022-11-10 22:15:10 -08:00
Swagat Bora
3b87d46ce2 Add tracing spans in CRI image service and pull.go
Signed-off-by: Swagat Bora <sbora@amazon.com>

Add spans around image unpack operations
Use image.ref to denote image name and image.id for the image config digest
Add top-level spand and record errors in the CRI instrumentation service
2022-11-03 17:03:43 +00:00
Joseph Sheng
fc86be5011 not init a tracing processor when not loaded
Signed-off-by: Joseph Sheng <jiajun.sheng@microfocus.com>
2022-10-18 09:47:22 +08:00
Cory Snider
927b34e41e tracing: fix panic on startup when configured
When support for http/protobuf was added, the OTLP tracing processor
plugin was mistakenly changed to return a raw OTLP exporter instance.
Consequently, the type-assertion to a trace.SpanProcessor inside the
tracing pluigin would panic if the processor plugin was configured.
Modify the OTLP plugin to return a BatchSpanProcessor derived from the
exporter once more.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2022-04-07 19:51:14 -04:00
Maksym Pavlenko
0b2a95e107 Add no_tracing tag
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-03-31 14:37:11 -07:00
Kazuyoshi Kato
e751f1f44f tracing: support OTLP/HTTP in addition to gRPC
This change adds OTLP/HTTP, specifically http/protobuf support.

http/protobuf is recommended in
https://github.com/open-telemetry/opentelemetry-specification/blob/v1.8.0/specification/protocol/exporter.md.

However kube-apiserver and CRI-O use gRPC, kubelet may support
gRPC in future. So we should support gRPC as well.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-01-29 00:41:18 +00:00
Kazuyoshi Kato
69ae95531c tracing: fix OTLP tracer's initialization
- insecure.NewCredential was simply wrong. It has to use
  otlptracegrpc.WithInsecure to disable TLS.
- context.WithTimeout is nice to have, in case the endpoint is not
  correctly configured.
  Otherwise, the plugin initialization blocks indefinitely.
- grpc.WithReturnConnectionError is nice to have.
  Otherwise, otlptracegrpc.New returns "context deadline exceeded"
  without underlying errors.
- TraceSamplingRatio should be 1.0 by default.
  Otherwise, users need to configure both io.containerd.internal.v1.tracing
  and io.containerd.tracing.processor.v1.otlp.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-01-13 17:50:18 +00:00
haoyun
bbe46b8c43 feat: replace github.com/pkg/errors to errors
Signed-off-by: haoyun <yun.hao@daocloud.io>
Co-authored-by: zounengren <zouyee1989@gmail.com>
2022-01-07 10:27:03 +08:00
Kazuyoshi Kato
2ee3ce510c Use insecure.NewCredentials instead of grpc.WithInsecure
grpc.WithInsecure is being deprecated.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2021-12-16 23:10:06 +00:00
Brian Goff
084387e0b4 Move tracing to plugin
This just makes the implementation a little cleaner.
It also makes the trace exporter pluggable.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-09-21 21:19:46 +00:00