opentelemetry-api 0.16.0 → 1.0.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +57 -0
  3. data/README.md +3 -3
  4. data/lib/opentelemetry.rb +21 -28
  5. data/lib/opentelemetry/baggage.rb +95 -2
  6. data/lib/opentelemetry/baggage/builder.rb +30 -4
  7. data/lib/opentelemetry/baggage/entry.rb +20 -0
  8. data/lib/opentelemetry/baggage/propagation.rb +9 -18
  9. data/lib/opentelemetry/baggage/propagation/text_map_propagator.rb +111 -0
  10. data/lib/opentelemetry/context.rb +48 -33
  11. data/lib/opentelemetry/context/propagation.rb +35 -5
  12. data/lib/opentelemetry/context/propagation/composite_text_map_propagator.rb +105 -0
  13. data/lib/opentelemetry/context/propagation/noop_text_map_propagator.rb +27 -0
  14. data/lib/opentelemetry/context/propagation/{propagator.rb → text_map_propagator.rb} +23 -16
  15. data/lib/opentelemetry/internal.rb +17 -0
  16. data/lib/opentelemetry/internal/proxy_tracer.rb +38 -0
  17. data/lib/opentelemetry/internal/proxy_tracer_provider.rb +59 -0
  18. data/lib/opentelemetry/trace.rb +10 -0
  19. data/lib/opentelemetry/trace/propagation/trace_context.rb +7 -18
  20. data/lib/opentelemetry/trace/propagation/trace_context/text_map_propagator.rb +73 -0
  21. data/lib/opentelemetry/trace/status.rb +34 -5
  22. data/lib/opentelemetry/trace/tracer.rb +8 -9
  23. data/lib/opentelemetry/version.rb +1 -1
  24. metadata +16 -25
  25. data/lib/opentelemetry/baggage/manager.rb +0 -41
  26. data/lib/opentelemetry/baggage/propagation/text_map_extractor.rb +0 -57
  27. data/lib/opentelemetry/baggage/propagation/text_map_injector.rb +0 -52
  28. data/lib/opentelemetry/context/propagation/composite_propagator.rb +0 -72
  29. data/lib/opentelemetry/context/propagation/noop_extractor.rb +0 -26
  30. data/lib/opentelemetry/context/propagation/noop_injector.rb +0 -26
  31. data/lib/opentelemetry/instrumentation.rb +0 -15
  32. data/lib/opentelemetry/instrumentation/base.rb +0 -307
  33. data/lib/opentelemetry/instrumentation/registry.rb +0 -86
  34. data/lib/opentelemetry/metrics.rb +0 -16
  35. data/lib/opentelemetry/metrics/handles.rb +0 -44
  36. data/lib/opentelemetry/metrics/instruments.rb +0 -105
  37. data/lib/opentelemetry/metrics/meter.rb +0 -72
  38. data/lib/opentelemetry/metrics/meter_provider.rb +0 -22
  39. data/lib/opentelemetry/trace/propagation/trace_context/text_map_extractor.rb +0 -52
  40. data/lib/opentelemetry/trace/propagation/trace_context/text_map_injector.rb +0 -49
  41. data/lib/opentelemetry/trace/util/http_to_status.rb +0 -28
@@ -1,28 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Copyright The OpenTelemetry Authors
4
- #
5
- # SPDX-License-Identifier: Apache-2.0
6
-
7
- module OpenTelemetry
8
- module Trace
9
- module Util
10
- # Convenience methods, not necessarily required by the API specification.
11
- module HttpToStatus
12
- # Maps numeric HTTP status codes to Trace::Status. This module is a mixin for Trace::Status
13
- # and is not intended for standalone use.
14
- #
15
- # @param code Numeric HTTP status
16
- # @return Status
17
- def http_to_status(code)
18
- case code.to_i
19
- when 100..399
20
- new(const_get(:OK))
21
- else
22
- new(const_get(:ERROR))
23
- end
24
- end
25
- end
26
- end
27
- end
28
- end