context_value.h 916 B

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright The OpenTelemetry Authors
  2. // SPDX-License-Identifier: Apache-2.0
  3. #pragma once
  4. #include <cstdint>
  5. #include "opentelemetry/nostd/shared_ptr.h"
  6. #include "opentelemetry/nostd/variant.h"
  7. #include "opentelemetry/version.h"
  8. OPENTELEMETRY_BEGIN_NAMESPACE
  9. namespace baggage
  10. {
  11. class Baggage;
  12. } // namespace baggage
  13. namespace trace
  14. {
  15. class Span;
  16. class SpanContext;
  17. } // namespace trace
  18. namespace context
  19. {
  20. using ContextValue = nostd::variant<nostd::monostate,
  21. bool,
  22. int64_t,
  23. uint64_t,
  24. double,
  25. nostd::shared_ptr<trace::Span>,
  26. nostd::shared_ptr<trace::SpanContext>,
  27. nostd::shared_ptr<baggage::Baggage>>;
  28. } // namespace context
  29. OPENTELEMETRY_END_NAMESPACE