index.js 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Copyright The OpenTelemetry Authors
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * https://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. export { baggageEntryMetadataFromString } from './baggage/utils';
  17. // Context APIs
  18. export { createContextKey, ROOT_CONTEXT } from './context/context';
  19. // Diag APIs
  20. export { DiagConsoleLogger } from './diag/consoleLogger';
  21. export { DiagLogLevel, } from './diag/types';
  22. // Metrics APIs
  23. export { createNoopMeter } from './metrics/NoopMeter';
  24. export { ValueType, } from './metrics/Metric';
  25. // Propagation APIs
  26. export { defaultTextMapGetter, defaultTextMapSetter, } from './propagation/TextMapPropagator';
  27. export { ProxyTracer } from './trace/ProxyTracer';
  28. export { ProxyTracerProvider } from './trace/ProxyTracerProvider';
  29. export { SamplingDecision } from './trace/SamplingResult';
  30. export { SpanKind } from './trace/span_kind';
  31. export { SpanStatusCode } from './trace/status';
  32. export { TraceFlags } from './trace/trace_flags';
  33. export { createTraceState } from './trace/internal/utils';
  34. export { isSpanContextValid, isValidTraceId, isValidSpanId, } from './trace/spancontext-utils';
  35. export { INVALID_SPANID, INVALID_TRACEID, INVALID_SPAN_CONTEXT, } from './trace/invalid-span-constants';
  36. // Split module-level variable definition into separate files to allow
  37. // tree-shaking on each api instance.
  38. import { context } from './context-api';
  39. import { diag } from './diag-api';
  40. import { metrics } from './metrics-api';
  41. import { propagation } from './propagation-api';
  42. import { trace } from './trace-api';
  43. // Named export.
  44. export { context, diag, metrics, propagation, trace };
  45. // Default export.
  46. export default {
  47. context,
  48. diag,
  49. metrics,
  50. propagation,
  51. trace,
  52. };
  53. //# sourceMappingURL=index.js.map