@opentelemetry/api 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/README.md +3 -10
  3. package/build/esm/api/context.js.map +1 -1
  4. package/build/esm/api/diag.js +5 -4
  5. package/build/esm/api/diag.js.map +1 -1
  6. package/build/esm/api/propagation.js.map +1 -1
  7. package/build/esm/api/trace.js +5 -2
  8. package/build/esm/api/trace.js.map +1 -1
  9. package/build/esm/baggage/context-helpers.js.map +1 -1
  10. package/build/esm/baggage/internal/baggage-impl.js.map +1 -1
  11. package/build/esm/baggage/internal/symbol.js.map +1 -1
  12. package/build/esm/baggage/types.js.map +1 -1
  13. package/build/esm/baggage/utils.js +2 -1
  14. package/build/esm/baggage/utils.js.map +1 -1
  15. package/build/esm/common/Attributes.d.ts +15 -0
  16. package/build/esm/common/Attributes.js +17 -0
  17. package/build/esm/common/Attributes.js.map +1 -0
  18. package/build/esm/common/Exception.js.map +1 -1
  19. package/build/esm/common/Time.d.ts +12 -0
  20. package/build/esm/common/Time.js.map +1 -1
  21. package/build/esm/context/NoopContextManager.js.map +1 -1
  22. package/build/esm/context/context.js.map +1 -1
  23. package/build/esm/context/types.js.map +1 -1
  24. package/build/esm/diag/ComponentLogger.js.map +1 -1
  25. package/build/esm/diag/consoleLogger.js +7 -2
  26. package/build/esm/diag/consoleLogger.js.map +1 -1
  27. package/build/esm/diag/index.js.map +1 -1
  28. package/build/esm/diag/internal/logLevelLogger.js.map +1 -1
  29. package/build/esm/diag/internal/noopLogger.js.map +1 -1
  30. package/build/esm/diag/types.js.map +1 -1
  31. package/build/esm/index.d.ts +5 -1
  32. package/build/esm/index.js +5 -1
  33. package/build/esm/index.js.map +1 -1
  34. package/build/esm/internal/global-utils.d.ts +2 -3
  35. package/build/esm/internal/global-utils.js.map +1 -1
  36. package/build/esm/internal/semver.js +13 -1
  37. package/build/esm/internal/semver.js.map +1 -1
  38. package/build/esm/platform/browser/globalThis.d.ts +7 -0
  39. package/build/esm/platform/browser/globalThis.js +14 -1
  40. package/build/esm/platform/browser/globalThis.js.map +1 -1
  41. package/build/esm/platform/browser/index.js.map +1 -1
  42. package/build/esm/platform/index.js.map +1 -1
  43. package/build/esm/platform/node/globalThis.js.map +1 -1
  44. package/build/esm/platform/node/index.js.map +1 -1
  45. package/build/esm/propagation/NoopTextMapPropagator.js.map +1 -1
  46. package/build/esm/propagation/TextMapPropagator.js.map +1 -1
  47. package/build/esm/trace/NonRecordingSpan.js +1 -1
  48. package/build/esm/trace/NonRecordingSpan.js.map +1 -1
  49. package/build/esm/trace/NoopTracer.js +2 -1
  50. package/build/esm/trace/NoopTracer.js.map +1 -1
  51. package/build/esm/trace/NoopTracerProvider.d.ts +2 -1
  52. package/build/esm/trace/NoopTracerProvider.js +1 -1
  53. package/build/esm/trace/NoopTracerProvider.js.map +1 -1
  54. package/build/esm/trace/ProxyTracer.d.ts +6 -2
  55. package/build/esm/trace/ProxyTracer.js +5 -3
  56. package/build/esm/trace/ProxyTracer.js.map +1 -1
  57. package/build/esm/trace/ProxyTracerProvider.d.ts +3 -2
  58. package/build/esm/trace/ProxyTracerProvider.js +4 -4
  59. package/build/esm/trace/ProxyTracerProvider.js.map +1 -1
  60. package/build/esm/trace/Sampler.js.map +1 -1
  61. package/build/esm/trace/SamplingResult.js.map +1 -1
  62. package/build/esm/trace/SpanOptions.js.map +1 -1
  63. package/build/esm/trace/attributes.d.ts +7 -7
  64. package/build/esm/trace/attributes.js.map +1 -1
  65. package/build/esm/trace/context-utils.js.map +1 -1
  66. package/build/esm/trace/internal/tracestate-impl.d.ts +22 -0
  67. package/build/esm/trace/internal/tracestate-impl.js +102 -0
  68. package/build/esm/trace/internal/tracestate-impl.js.map +1 -0
  69. package/build/esm/trace/internal/tracestate-validators.d.ts +15 -0
  70. package/build/esm/trace/internal/tracestate-validators.js +41 -0
  71. package/build/esm/trace/internal/tracestate-validators.js.map +1 -0
  72. package/build/esm/trace/internal/utils.d.ts +3 -0
  73. package/build/esm/trace/internal/utils.js +20 -0
  74. package/build/esm/trace/internal/utils.js.map +1 -0
  75. package/build/esm/trace/invalid-span-constants.d.ts +5 -0
  76. package/build/esm/trace/invalid-span-constants.js +24 -0
  77. package/build/esm/trace/invalid-span-constants.js.map +1 -0
  78. package/build/esm/trace/link.js.map +1 -1
  79. package/build/esm/trace/span.js.map +1 -1
  80. package/build/esm/trace/span_context.js.map +1 -1
  81. package/build/esm/trace/span_kind.js.map +1 -1
  82. package/build/esm/trace/spancontext-utils.d.ts +0 -3
  83. package/build/esm/trace/spancontext-utils.js +1 -8
  84. package/build/esm/trace/spancontext-utils.js.map +1 -1
  85. package/build/esm/trace/status.js.map +1 -1
  86. package/build/esm/trace/trace_flags.js.map +1 -1
  87. package/build/esm/trace/trace_state.js.map +1 -1
  88. package/build/esm/trace/tracer.d.ts +30 -29
  89. package/build/esm/trace/tracer.js.map +1 -1
  90. package/build/esm/trace/tracer_options.d.ts +10 -0
  91. package/build/esm/trace/tracer_options.js +17 -0
  92. package/build/esm/trace/tracer_options.js.map +1 -0
  93. package/build/esm/trace/tracer_provider.d.ts +3 -1
  94. package/build/esm/trace/tracer_provider.js.map +1 -1
  95. package/build/esm/version.d.ts +1 -1
  96. package/build/esm/version.js +1 -1
  97. package/build/esm/version.js.map +1 -1
  98. package/build/src/api/context.js.map +1 -1
  99. package/build/src/api/diag.js +5 -4
  100. package/build/src/api/diag.js.map +1 -1
  101. package/build/src/api/propagation.js.map +1 -1
  102. package/build/src/api/trace.js +5 -2
  103. package/build/src/api/trace.js.map +1 -1
  104. package/build/src/baggage/context-helpers.js.map +1 -1
  105. package/build/src/baggage/internal/baggage-impl.js.map +1 -1
  106. package/build/src/baggage/internal/symbol.js.map +1 -1
  107. package/build/src/baggage/types.js.map +1 -1
  108. package/build/src/baggage/utils.js +3 -2
  109. package/build/src/baggage/utils.js.map +1 -1
  110. package/build/src/common/Attributes.d.ts +15 -0
  111. package/build/src/common/Attributes.js +18 -0
  112. package/build/src/common/Attributes.js.map +1 -0
  113. package/build/src/common/Exception.js.map +1 -1
  114. package/build/src/common/Time.d.ts +12 -0
  115. package/build/src/common/Time.js.map +1 -1
  116. package/build/src/context/NoopContextManager.js.map +1 -1
  117. package/build/src/context/context.js.map +1 -1
  118. package/build/src/context/types.js.map +1 -1
  119. package/build/src/diag/ComponentLogger.js.map +1 -1
  120. package/build/src/diag/consoleLogger.js +7 -2
  121. package/build/src/diag/consoleLogger.js.map +1 -1
  122. package/build/src/diag/index.js.map +1 -1
  123. package/build/src/diag/internal/logLevelLogger.js.map +1 -1
  124. package/build/src/diag/internal/noopLogger.js.map +1 -1
  125. package/build/src/diag/types.js.map +1 -1
  126. package/build/src/index.d.ts +5 -1
  127. package/build/src/index.js +9 -4
  128. package/build/src/index.js.map +1 -1
  129. package/build/src/internal/global-utils.d.ts +2 -3
  130. package/build/src/internal/global-utils.js.map +1 -1
  131. package/build/src/internal/semver.js +13 -1
  132. package/build/src/internal/semver.js.map +1 -1
  133. package/build/src/platform/browser/globalThis.d.ts +7 -0
  134. package/build/src/platform/browser/globalThis.js +14 -1
  135. package/build/src/platform/browser/globalThis.js.map +1 -1
  136. package/build/src/platform/browser/index.js.map +1 -1
  137. package/build/src/platform/index.js.map +1 -1
  138. package/build/src/platform/node/globalThis.js.map +1 -1
  139. package/build/src/platform/node/index.js.map +1 -1
  140. package/build/src/propagation/NoopTextMapPropagator.js.map +1 -1
  141. package/build/src/propagation/TextMapPropagator.js.map +1 -1
  142. package/build/src/trace/NonRecordingSpan.js +2 -2
  143. package/build/src/trace/NonRecordingSpan.js.map +1 -1
  144. package/build/src/trace/NoopTracer.js +4 -3
  145. package/build/src/trace/NoopTracer.js.map +1 -1
  146. package/build/src/trace/NoopTracerProvider.d.ts +2 -1
  147. package/build/src/trace/NoopTracerProvider.js +1 -1
  148. package/build/src/trace/NoopTracerProvider.js.map +1 -1
  149. package/build/src/trace/ProxyTracer.d.ts +6 -2
  150. package/build/src/trace/ProxyTracer.js +5 -3
  151. package/build/src/trace/ProxyTracer.js.map +1 -1
  152. package/build/src/trace/ProxyTracerProvider.d.ts +3 -2
  153. package/build/src/trace/ProxyTracerProvider.js +4 -4
  154. package/build/src/trace/ProxyTracerProvider.js.map +1 -1
  155. package/build/src/trace/Sampler.js.map +1 -1
  156. package/build/src/trace/SamplingResult.js.map +1 -1
  157. package/build/src/trace/SpanOptions.js.map +1 -1
  158. package/build/src/trace/attributes.d.ts +7 -7
  159. package/build/src/trace/attributes.js.map +1 -1
  160. package/build/src/trace/context-utils.js.map +1 -1
  161. package/build/src/trace/internal/tracestate-impl.d.ts +22 -0
  162. package/build/src/trace/internal/tracestate-impl.js +105 -0
  163. package/build/src/trace/internal/tracestate-impl.js.map +1 -0
  164. package/build/src/trace/internal/tracestate-validators.d.ts +15 -0
  165. package/build/src/trace/internal/tracestate-validators.js +46 -0
  166. package/build/src/trace/internal/tracestate-validators.js.map +1 -0
  167. package/build/src/trace/internal/utils.d.ts +3 -0
  168. package/build/src/trace/internal/utils.js +24 -0
  169. package/build/src/trace/internal/utils.js.map +1 -0
  170. package/build/src/trace/invalid-span-constants.d.ts +5 -0
  171. package/build/src/trace/invalid-span-constants.js +27 -0
  172. package/build/src/trace/invalid-span-constants.js.map +1 -0
  173. package/build/src/trace/link.js.map +1 -1
  174. package/build/src/trace/span.js.map +1 -1
  175. package/build/src/trace/span_context.js.map +1 -1
  176. package/build/src/trace/span_kind.js.map +1 -1
  177. package/build/src/trace/spancontext-utils.d.ts +0 -3
  178. package/build/src/trace/spancontext-utils.js +4 -11
  179. package/build/src/trace/spancontext-utils.js.map +1 -1
  180. package/build/src/trace/status.js.map +1 -1
  181. package/build/src/trace/trace_flags.js.map +1 -1
  182. package/build/src/trace/trace_state.js.map +1 -1
  183. package/build/src/trace/tracer.d.ts +30 -29
  184. package/build/src/trace/tracer.js.map +1 -1
  185. package/build/src/trace/tracer_options.d.ts +10 -0
  186. package/build/src/trace/tracer_options.js +18 -0
  187. package/build/src/trace/tracer_options.js.map +1 -0
  188. package/build/src/trace/tracer_provider.d.ts +3 -1
  189. package/build/src/trace/tracer_provider.js.map +1 -1
  190. package/build/src/version.d.ts +1 -1
  191. package/build/src/version.js +1 -1
  192. package/build/src/version.js.map +1 -1
  193. package/package.json +13 -11
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invalid-span-constants.js","sourceRoot":"","sources":["../../../src/trace/invalid-span-constants.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,6CAA2C;AAE9B,QAAA,cAAc,GAAG,kBAAkB,CAAC;AACpC,QAAA,eAAe,GAAG,kCAAkC,CAAC;AACrD,QAAA,oBAAoB,GAAgB;IAC/C,OAAO,EAAE,uBAAe;IACxB,MAAM,EAAE,sBAAc;IACtB,UAAU,EAAE,wBAAU,CAAC,IAAI;CAC5B,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { SpanContext } from './span_context';\nimport { TraceFlags } from './trace_flags';\n\nexport const INVALID_SPANID = '0000000000000000';\nexport const INVALID_TRACEID = '00000000000000000000000000000000';\nexport const INVALID_SPAN_CONTEXT: SpanContext = {\n traceId: INVALID_TRACEID,\n spanId: INVALID_SPANID,\n traceFlags: TraceFlags.NONE,\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"link.js","sourceRoot":"","sources":["../../../src/trace/link.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"}
1
+ {"version":3,"file":"link.js","sourceRoot":"","sources":["../../../src/trace/link.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { SpanAttributes } from './attributes';\nimport { SpanContext } from './span_context';\n\n/**\n * A pointer from the current {@link Span} to another span in the same trace or\n * in a different trace.\n * Few examples of Link usage.\n * 1. Batch Processing: A batch of elements may contain elements associated\n * with one or more traces/spans. Since there can only be one parent\n * SpanContext, Link is used to keep reference to SpanContext of all\n * elements in the batch.\n * 2. Public Endpoint: A SpanContext in incoming client request on a public\n * endpoint is untrusted from service provider perspective. In such case it\n * is advisable to start a new trace with appropriate sampling decision.\n * However, it is desirable to associate incoming SpanContext to new trace\n * initiated on service provider side so two traces (from Client and from\n * Service Provider) can be correlated.\n */\nexport interface Link {\n /** The {@link SpanContext} of a linked span. */\n context: SpanContext;\n /** A set of {@link SpanAttributes} on the link. */\n attributes?: SpanAttributes;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"span.js","sourceRoot":"","sources":["../../../src/trace/span.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"}
1
+ {"version":3,"file":"span.js","sourceRoot":"","sources":["../../../src/trace/span.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Exception } from '../common/Exception';\nimport { TimeInput } from '../common/Time';\nimport { SpanAttributes, SpanAttributeValue } from './attributes';\nimport { SpanContext } from './span_context';\nimport { SpanStatus } from './status';\n\n/**\n * An interface that represents a span. A span represents a single operation\n * within a trace. Examples of span might include remote procedure calls or a\n * in-process function calls to sub-components. A Trace has a single, top-level\n * \"root\" Span that in turn may have zero or more child Spans, which in turn\n * may have children.\n *\n * Spans are created by the {@link Tracer.startSpan} method.\n */\nexport interface Span {\n /**\n * Returns the {@link SpanContext} object associated with this Span.\n *\n * Get an immutable, serializable identifier for this span that can be used\n * to create new child spans. Returned SpanContext is usable even after the\n * span ends.\n *\n * @returns the SpanContext object associated with this Span.\n */\n spanContext(): SpanContext;\n\n /**\n * Sets an attribute to the span.\n *\n * Sets a single Attribute with the key and value passed as arguments.\n *\n * @param key the key for this attribute.\n * @param value the value for this attribute. Setting a value null or\n * undefined is invalid and will result in undefined behavior.\n */\n setAttribute(key: string, value: SpanAttributeValue): this;\n\n /**\n * Sets attributes to the span.\n *\n * @param attributes the attributes that will be added.\n * null or undefined attribute values\n * are invalid and will result in undefined behavior.\n */\n setAttributes(attributes: SpanAttributes): this;\n\n /**\n * Adds an event to the Span.\n *\n * @param name the name of the event.\n * @param [attributesOrStartTime] the attributes that will be added; these are\n * associated with this event. Can be also a start time\n * if type is {@type TimeInput} and 3rd param is undefined\n * @param [startTime] start time of the event.\n */\n addEvent(\n name: string,\n attributesOrStartTime?: SpanAttributes | TimeInput,\n startTime?: TimeInput\n ): this;\n\n /**\n * Sets a status to the span. If used, this will override the default Span\n * status. Default is {@link SpanStatusCode.UNSET}. SetStatus overrides the value\n * of previous calls to SetStatus on the Span.\n *\n * @param status the SpanStatus to set.\n */\n setStatus(status: SpanStatus): this;\n\n /**\n * Updates the Span name.\n *\n * This will override the name provided via {@link Tracer.startSpan}.\n *\n * Upon this update, any sampling behavior based on Span name will depend on\n * the implementation.\n *\n * @param name the Span name.\n */\n updateName(name: string): this;\n\n /**\n * Marks the end of Span execution.\n *\n * Call to End of a Span MUST not have any effects on child spans. Those may\n * still be running and can be ended later.\n *\n * Do not return `this`. The Span generally should not be used after it\n * is ended so chaining is not desired in this context.\n *\n * @param [endTime] the time to set as Span's end time. If not provided,\n * use the current time as the span's end time.\n */\n end(endTime?: TimeInput): void;\n\n /**\n * Returns the flag whether this span will be recorded.\n *\n * @returns true if this Span is active and recording information like events\n * with the `AddEvent` operation and attributes using `setAttributes`.\n */\n isRecording(): boolean;\n\n /**\n * Sets exception as a span event\n * @param exception the exception the only accepted values are string or Error\n * @param [time] the time to set as Span's event time. If not provided,\n * use the current time.\n */\n recordException(exception: Exception, time?: TimeInput): void;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"span_context.js","sourceRoot":"","sources":["../../../src/trace/span_context.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"}
1
+ {"version":3,"file":"span_context.js","sourceRoot":"","sources":["../../../src/trace/span_context.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { TraceState } from './trace_state';\n\n/**\n * A SpanContext represents the portion of a {@link Span} which must be\n * serialized and propagated along side of a {@link Baggage}.\n */\nexport interface SpanContext {\n /**\n * The ID of the trace that this span belongs to. It is worldwide unique\n * with practically sufficient probability by being made as 16 randomly\n * generated bytes, encoded as a 32 lowercase hex characters corresponding to\n * 128 bits.\n */\n traceId: string;\n /**\n * The ID of the Span. It is globally unique with practically sufficient\n * probability by being made as 8 randomly generated bytes, encoded as a 16\n * lowercase hex characters corresponding to 64 bits.\n */\n spanId: string;\n /**\n * Only true if the SpanContext was propagated from a remote parent.\n */\n isRemote?: boolean;\n /**\n * Trace flags to propagate.\n *\n * It is represented as 1 byte (bitmap). Bit to represent whether trace is\n * sampled or not. When set, the least significant bit documents that the\n * caller may have recorded trace data. A caller who does not record trace\n * data out-of-band leaves this flag unset.\n *\n * see {@link TraceFlags} for valid flag values.\n */\n traceFlags: number;\n /**\n * Tracing-system-specific info to propagate.\n *\n * The tracestate field value is a `list` as defined below. The `list` is a\n * series of `list-members` separated by commas `,`, and a list-member is a\n * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs\n * surrounding `list-members` are ignored. There can be a maximum of 32\n * `list-members` in a `list`.\n * More Info: https://www.w3.org/TR/trace-context/#tracestate-field\n *\n * Examples:\n * Single tracing system (generic format):\n * tracestate: rojo=00f067aa0ba902b7\n * Multiple tracing systems (with different formatting):\n * tracestate: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE\n */\n traceState?: TraceState;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"span_kind.js","sourceRoot":"","sources":["../../../src/trace/span_kind.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,IAAY,QA6BX;AA7BD,WAAY,QAAQ;IAClB,iEAAiE;IACjE,+CAAY,CAAA;IAEZ;;;OAGG;IACH,2CAAU,CAAA;IAEV;;;OAGG;IACH,2CAAU,CAAA;IAEV;;;;OAIG;IACH,+CAAY,CAAA;IAEZ;;;;OAIG;IACH,+CAAY,CAAA;AACd,CAAC,EA7BW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QA6BnB"}
1
+ {"version":3,"file":"span_kind.js","sourceRoot":"","sources":["../../../src/trace/span_kind.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,IAAY,QA6BX;AA7BD,WAAY,QAAQ;IAClB,iEAAiE;IACjE,+CAAY,CAAA;IAEZ;;;OAGG;IACH,2CAAU,CAAA;IAEV;;;OAGG;IACH,2CAAU,CAAA;IAEV;;;;OAIG;IACH,+CAAY,CAAA;IAEZ;;;;OAIG;IACH,+CAAY,CAAA;AACd,CAAC,EA7BW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QA6BnB","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum SpanKind {\n /** Default value. Indicates that the span is used internally. */\n INTERNAL = 0,\n\n /**\n * Indicates that the span covers server-side handling of an RPC or other\n * remote request.\n */\n SERVER = 1,\n\n /**\n * Indicates that the span covers the client-side wrapper around an RPC or\n * other remote request.\n */\n CLIENT = 2,\n\n /**\n * Indicates that the span describes producer sending a message to a\n * broker. Unlike client and server, there is no direct critical path latency\n * relationship between producer and consumer spans.\n */\n PRODUCER = 3,\n\n /**\n * Indicates that the span describes consumer receiving a message from a\n * broker. Unlike client and server, there is no direct critical path latency\n * relationship between producer and consumer spans.\n */\n CONSUMER = 4,\n}\n"]}
@@ -1,8 +1,5 @@
1
1
  import { Span } from './span';
2
2
  import { SpanContext } from './span_context';
3
- export declare const INVALID_SPANID = "0000000000000000";
4
- export declare const INVALID_TRACEID = "00000000000000000000000000000000";
5
- export declare const INVALID_SPAN_CONTEXT: SpanContext;
6
3
  export declare function isValidTraceId(traceId: string): boolean;
7
4
  export declare function isValidSpanId(spanId: string): boolean;
8
5
  /**
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = void 0;
3
+ exports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = void 0;
4
4
  /*
5
5
  * Copyright The OpenTelemetry Authors
6
6
  *
@@ -16,23 +16,16 @@ exports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = e
16
16
  * See the License for the specific language governing permissions and
17
17
  * limitations under the License.
18
18
  */
19
+ var invalid_span_constants_1 = require("./invalid-span-constants");
19
20
  var NonRecordingSpan_1 = require("./NonRecordingSpan");
20
- var trace_flags_1 = require("./trace_flags");
21
21
  var VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i;
22
22
  var VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i;
23
- exports.INVALID_SPANID = '0000000000000000';
24
- exports.INVALID_TRACEID = '00000000000000000000000000000000';
25
- exports.INVALID_SPAN_CONTEXT = {
26
- traceId: exports.INVALID_TRACEID,
27
- spanId: exports.INVALID_SPANID,
28
- traceFlags: trace_flags_1.TraceFlags.NONE,
29
- };
30
23
  function isValidTraceId(traceId) {
31
- return VALID_TRACEID_REGEX.test(traceId) && traceId !== exports.INVALID_TRACEID;
24
+ return VALID_TRACEID_REGEX.test(traceId) && traceId !== invalid_span_constants_1.INVALID_TRACEID;
32
25
  }
33
26
  exports.isValidTraceId = isValidTraceId;
34
27
  function isValidSpanId(spanId) {
35
- return VALID_SPANID_REGEX.test(spanId) && spanId !== exports.INVALID_SPANID;
28
+ return VALID_SPANID_REGEX.test(spanId) && spanId !== invalid_span_constants_1.INVALID_SPANID;
36
29
  }
37
30
  exports.isValidSpanId = isValidSpanId;
38
31
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"spancontext-utils.js","sourceRoot":"","sources":["../../../src/trace/spancontext-utils.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,uDAAsD;AAGtD,6CAA2C;AAE3C,IAAM,mBAAmB,GAAG,mBAAmB,CAAC;AAChD,IAAM,kBAAkB,GAAG,iBAAiB,CAAC;AAChC,QAAA,cAAc,GAAG,kBAAkB,CAAC;AACpC,QAAA,eAAe,GAAG,kCAAkC,CAAC;AACrD,QAAA,oBAAoB,GAAgB;IAC/C,OAAO,EAAE,uBAAe;IACxB,MAAM,EAAE,sBAAc;IACtB,UAAU,EAAE,wBAAU,CAAC,IAAI;CAC5B,CAAC;AAEF,SAAgB,cAAc,CAAC,OAAe;IAC5C,OAAO,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,OAAO,KAAK,uBAAe,CAAC;AAC1E,CAAC;AAFD,wCAEC;AAED,SAAgB,aAAa,CAAC,MAAc;IAC1C,OAAO,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,MAAM,KAAK,sBAAc,CAAC;AACtE,CAAC;AAFD,sCAEC;AAED;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,WAAwB;IACzD,OAAO,CACL,cAAc,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,aAAa,CAAC,WAAW,CAAC,MAAM,CAAC,CACzE,CAAC;AACJ,CAAC;AAJD,gDAIC;AAED;;;;;GAKG;AACH,SAAgB,eAAe,CAAC,WAAwB;IACtD,OAAO,IAAI,mCAAgB,CAAC,WAAW,CAAC,CAAC;AAC3C,CAAC;AAFD,0CAEC"}
1
+ {"version":3,"file":"spancontext-utils.js","sourceRoot":"","sources":["../../../src/trace/spancontext-utils.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,mEAA2E;AAC3E,uDAAsD;AAItD,IAAM,mBAAmB,GAAG,mBAAmB,CAAC;AAChD,IAAM,kBAAkB,GAAG,iBAAiB,CAAC;AAE7C,SAAgB,cAAc,CAAC,OAAe;IAC5C,OAAO,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,OAAO,KAAK,wCAAe,CAAC;AAC1E,CAAC;AAFD,wCAEC;AAED,SAAgB,aAAa,CAAC,MAAc;IAC1C,OAAO,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,MAAM,KAAK,uCAAc,CAAC;AACtE,CAAC;AAFD,sCAEC;AAED;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,WAAwB;IACzD,OAAO,CACL,cAAc,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,aAAa,CAAC,WAAW,CAAC,MAAM,CAAC,CACzE,CAAC;AACJ,CAAC;AAJD,gDAIC;AAED;;;;;GAKG;AACH,SAAgB,eAAe,CAAC,WAAwB;IACtD,OAAO,IAAI,mCAAgB,CAAC,WAAW,CAAC,CAAC;AAC3C,CAAC;AAFD,0CAEC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { INVALID_SPANID, INVALID_TRACEID } from './invalid-span-constants';\nimport { NonRecordingSpan } from './NonRecordingSpan';\nimport { Span } from './span';\nimport { SpanContext } from './span_context';\n\nconst VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i;\nconst VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i;\n\nexport function isValidTraceId(traceId: string): boolean {\n return VALID_TRACEID_REGEX.test(traceId) && traceId !== INVALID_TRACEID;\n}\n\nexport function isValidSpanId(spanId: string): boolean {\n return VALID_SPANID_REGEX.test(spanId) && spanId !== INVALID_SPANID;\n}\n\n/**\n * Returns true if this {@link SpanContext} is valid.\n * @return true if this {@link SpanContext} is valid.\n */\nexport function isSpanContextValid(spanContext: SpanContext): boolean {\n return (\n isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId)\n );\n}\n\n/**\n * Wrap the given {@link SpanContext} in a new non-recording {@link Span}\n *\n * @param spanContext span context to be wrapped\n * @returns a new non-recording {@link Span} with the provided context\n */\nexport function wrapSpanContext(spanContext: SpanContext): Span {\n return new NonRecordingSpan(spanContext);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"status.js","sourceRoot":"","sources":["../../../src/trace/status.ts"],"names":[],"mappings":";;;AAsBA;;GAEG;AACH,IAAY,cAcX;AAdD,WAAY,cAAc;IACxB;;OAEG;IACH,qDAAS,CAAA;IACT;;;OAGG;IACH,+CAAM,CAAA;IACN;;OAEG;IACH,qDAAS,CAAA;AACX,CAAC,EAdW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAczB"}
1
+ {"version":3,"file":"status.js","sourceRoot":"","sources":["../../../src/trace/status.ts"],"names":[],"mappings":";;;AAsBA;;GAEG;AACH,IAAY,cAcX;AAdD,WAAY,cAAc;IACxB;;OAEG;IACH,qDAAS,CAAA;IACT;;;OAGG;IACH,+CAAM,CAAA;IACN;;OAEG;IACH,qDAAS,CAAA;AACX,CAAC,EAdW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAczB","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport interface SpanStatus {\n /** The status code of this message. */\n code: SpanStatusCode;\n /** A developer-facing error message. */\n message?: string;\n}\n\n/**\n * An enumeration of status codes.\n */\nexport enum SpanStatusCode {\n /**\n * The default status.\n */\n UNSET = 0,\n /**\n * The operation has been validated by an Application developer or\n * Operator to have completed successfully.\n */\n OK = 1,\n /**\n * The operation contains an error.\n */\n ERROR = 2,\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"trace_flags.js","sourceRoot":"","sources":["../../../src/trace/trace_flags.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,8BAA8B;IAC9B,2CAAU,CAAA;IACV,gEAAgE;IAChE,iDAAkB,CAAA;AACpB,CAAC,EALW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAKrB"}
1
+ {"version":3,"file":"trace_flags.js","sourceRoot":"","sources":["../../../src/trace/trace_flags.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,8BAA8B;IAC9B,2CAAU,CAAA;IACV,gEAAgE;IAChE,iDAAkB,CAAA;AACpB,CAAC,EALW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAKrB","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum TraceFlags {\n /** Represents no flag set. */\n NONE = 0x0,\n /** Bit to represent whether trace is sampled in trace flags. */\n SAMPLED = 0x1 << 0,\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"trace_state.js","sourceRoot":"","sources":["../../../src/trace/trace_state.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"}
1
+ {"version":3,"file":"trace_state.js","sourceRoot":"","sources":["../../../src/trace/trace_state.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport interface TraceState {\n /**\n * Create a new TraceState which inherits from this TraceState and has the\n * given key set.\n * The new entry will always be added in the front of the list of states.\n *\n * @param key key of the TraceState entry.\n * @param value value of the TraceState entry.\n */\n set(key: string, value: string): TraceState;\n\n /**\n * Return a new TraceState which inherits from this TraceState but does not\n * contain the given key.\n *\n * @param key the key for the TraceState entry to be removed.\n */\n unset(key: string): TraceState;\n\n /**\n * Returns the value to which the specified key is mapped, or `undefined` if\n * this map contains no mapping for the key.\n *\n * @param key with which the specified value is to be associated.\n * @returns the value to which the specified key is mapped, or `undefined` if\n * this map contains no mapping for the key.\n */\n get(key: string): string | undefined;\n\n // TODO: Consider to add support for merging an object as well by also\n // accepting a single internalTraceState argument similar to the constructor.\n\n /**\n * Serializes the TraceState to a `list` as defined below. The `list` is a\n * series of `list-members` separated by commas `,`, and a list-member is a\n * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs\n * surrounding `list-members` are ignored. There can be a maximum of 32\n * `list-members` in a `list`.\n *\n * @returns the serialized string.\n */\n serialize(): string;\n}\n"]}
@@ -32,36 +32,37 @@ export interface Tracer {
32
32
  * @param fn function called in the context of the span and receives the newly created span as an argument
33
33
  * @returns return value of fn
34
34
  * @example
35
- * const something = tracer.startActiveSpan('op', span => {
36
- * try {
37
- * do some work
38
- * span.setStatus({code: SpanStatusCode.OK});
39
- * return something;
40
- * } catch (err) {
41
- * span.setStatus({
42
- * code: SpanStatusCode.ERROR,
43
- * message: err.message,
44
- * });
45
- * throw err;
46
- * } finally {
47
- * span.end();
48
- * }
49
- * });
35
+ * const something = tracer.startActiveSpan('op', span => {
36
+ * try {
37
+ * do some work
38
+ * span.setStatus({code: SpanStatusCode.OK});
39
+ * return something;
40
+ * } catch (err) {
41
+ * span.setStatus({
42
+ * code: SpanStatusCode.ERROR,
43
+ * message: err.message,
44
+ * });
45
+ * throw err;
46
+ * } finally {
47
+ * span.end();
48
+ * }
49
+ * });
50
+ *
50
51
  * @example
51
- * const span = tracer.startActiveSpan('op', span => {
52
- * try {
53
- * do some work
54
- * return span;
55
- * } catch (err) {
56
- * span.setStatus({
57
- * code: SpanStatusCode.ERROR,
58
- * message: err.message,
59
- * });
60
- * throw err;
61
- * }
62
- * });
63
- * do some more work
64
- * span.end();
52
+ * const span = tracer.startActiveSpan('op', span => {
53
+ * try {
54
+ * do some work
55
+ * return span;
56
+ * } catch (err) {
57
+ * span.setStatus({
58
+ * code: SpanStatusCode.ERROR,
59
+ * message: err.message,
60
+ * });
61
+ * throw err;
62
+ * }
63
+ * });
64
+ * do some more work
65
+ * span.end();
65
66
  */
66
67
  startActiveSpan<F extends (span: Span) => unknown>(name: string, fn: F): ReturnType<F>;
67
68
  startActiveSpan<F extends (span: Span) => unknown>(name: string, options: SpanOptions, fn: F): ReturnType<F>;
@@ -1 +1 @@
1
- {"version":3,"file":"tracer.js","sourceRoot":"","sources":["../../../src/trace/tracer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"}
1
+ {"version":3,"file":"tracer.js","sourceRoot":"","sources":["../../../src/trace/tracer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Context } from '../context/types';\nimport { Span } from './span';\nimport { SpanOptions } from './SpanOptions';\n\n/**\n * Tracer provides an interface for creating {@link Span}s.\n */\nexport interface Tracer {\n /**\n * Starts a new {@link Span}. Start the span without setting it on context.\n *\n * This method do NOT modify the current Context.\n *\n * @param name The name of the span\n * @param [options] SpanOptions used for span creation\n * @param [context] Context to use to extract parent\n * @returns Span The newly created span\n * @example\n * const span = tracer.startSpan('op');\n * span.setAttribute('key', 'value');\n * span.end();\n */\n startSpan(name: string, options?: SpanOptions, context?: Context): Span;\n\n /**\n * Starts a new {@link Span} and calls the given function passing it the\n * created span as first argument.\n * Additionally the new span gets set in context and this context is activated\n * for the duration of the function call.\n *\n * @param name The name of the span\n * @param [options] SpanOptions used for span creation\n * @param [context] Context to use to extract parent\n * @param fn function called in the context of the span and receives the newly created span as an argument\n * @returns return value of fn\n * @example\n * const something = tracer.startActiveSpan('op', span => {\n * try {\n * do some work\n * span.setStatus({code: SpanStatusCode.OK});\n * return something;\n * } catch (err) {\n * span.setStatus({\n * code: SpanStatusCode.ERROR,\n * message: err.message,\n * });\n * throw err;\n * } finally {\n * span.end();\n * }\n * });\n *\n * @example\n * const span = tracer.startActiveSpan('op', span => {\n * try {\n * do some work\n * return span;\n * } catch (err) {\n * span.setStatus({\n * code: SpanStatusCode.ERROR,\n * message: err.message,\n * });\n * throw err;\n * }\n * });\n * do some more work\n * span.end();\n */\n startActiveSpan<F extends (span: Span) => unknown>(\n name: string,\n fn: F\n ): ReturnType<F>;\n startActiveSpan<F extends (span: Span) => unknown>(\n name: string,\n options: SpanOptions,\n fn: F\n ): ReturnType<F>;\n startActiveSpan<F extends (span: Span) => unknown>(\n name: string,\n options: SpanOptions,\n context: Context,\n fn: F\n ): ReturnType<F>;\n}\n"]}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * An interface describes additional metadata of a tracer.
3
+ */
4
+ export interface TracerOptions {
5
+ /**
6
+ * The schemaUrl of the tracer or instrumentation library
7
+ */
8
+ schemaUrl?: string;
9
+ }
10
+ //# sourceMappingURL=tracer_options.d.ts.map
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright The OpenTelemetry Authors
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * https://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ //# sourceMappingURL=tracer_options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tracer_options.js","sourceRoot":"","sources":["../../../src/trace/tracer_options.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * An interface describes additional metadata of a tracer.\n */\nexport interface TracerOptions {\n /**\n * The schemaUrl of the tracer or instrumentation library\n */\n schemaUrl?: string;\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  import { Tracer } from './tracer';
2
+ import { TracerOptions } from './tracer_options';
2
3
  /**
3
4
  * A registry for creating named {@link Tracer}s.
4
5
  */
@@ -12,8 +13,9 @@ export interface TracerProvider {
12
13
  *
13
14
  * @param name The name of the tracer or instrumentation library.
14
15
  * @param version The version of the tracer or instrumentation library.
16
+ * @param options The options of the tracer or instrumentation library.
15
17
  * @returns Tracer A Tracer with the given name and version
16
18
  */
17
- getTracer(name: string, version?: string): Tracer;
19
+ getTracer(name: string, version?: string, options?: TracerOptions): Tracer;
18
20
  }
19
21
  //# sourceMappingURL=tracer_provider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tracer_provider.js","sourceRoot":"","sources":["../../../src/trace/tracer_provider.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"}
1
+ {"version":3,"file":"tracer_provider.js","sourceRoot":"","sources":["../../../src/trace/tracer_provider.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Tracer } from './tracer';\nimport { TracerOptions } from './tracer_options';\n\n/**\n * A registry for creating named {@link Tracer}s.\n */\nexport interface TracerProvider {\n /**\n * Returns a Tracer, creating one if one with the given name and version is\n * not already created.\n *\n * This function may return different Tracer types (e.g.\n * {@link NoopTracerProvider} vs. a functional tracer).\n *\n * @param name The name of the tracer or instrumentation library.\n * @param version The version of the tracer or instrumentation library.\n * @param options The options of the tracer or instrumentation library.\n * @returns Tracer A Tracer with the given name and version\n */\n getTracer(name: string, version?: string, options?: TracerOptions): Tracer;\n}\n"]}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.0.1";
1
+ export declare const VERSION = "1.1.0";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -17,5 +17,5 @@
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.VERSION = void 0;
19
19
  // this is autogenerated file, see scripts/version-update.js
20
- exports.VERSION = '1.0.1';
20
+ exports.VERSION = '1.1.0';
21
21
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,OAAO,GAAG,OAAO,CAAC"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,OAAO,GAAG,OAAO,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '1.1.0';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentelemetry/api",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "Public API for OpenTelemetry",
5
5
  "main": "build/src/index.js",
6
6
  "module": "build/esm/index.js",
@@ -12,19 +12,21 @@
12
12
  },
13
13
  "repository": "https://github.com/open-telemetry/opentelemetry-js-api.git",
14
14
  "scripts": {
15
- "build": "npm run compile",
16
15
  "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json",
17
16
  "codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p .",
18
17
  "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p .",
18
+ "precompile": "npm run version",
19
19
  "compile": "tsc --build tsconfig.json tsconfig.esm.json",
20
20
  "docs": "typedoc",
21
21
  "docs:deploy": "gh-pages --dist docs/out",
22
- "docs:test": "linkinator docs/out --silent --skip david-dm.org",
22
+ "docs:test": "linkinator docs/out --silent && linkinator docs/*.md *.md --markdown --silent",
23
23
  "lint:fix": "eslint src test --ext .ts --fix",
24
24
  "lint": "eslint src test --ext .ts",
25
25
  "test:browser": "nyc karma start --single-run",
26
26
  "test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts",
27
+ "cycle-check": "dpdm --exit-code circular:1 src/index.ts",
27
28
  "version": "node scripts/version-update.js",
29
+ "prewatch": "npm run version",
28
30
  "watch": "tsc --build --watch"
29
31
  },
30
32
  "keywords": [
@@ -56,17 +58,17 @@
56
58
  },
57
59
  "devDependencies": {
58
60
  "@types/mocha": "8.2.2",
59
- "@types/node": "14.17.1",
61
+ "@types/node": "14.17.4",
60
62
  "@types/sinon": "10.0.2",
61
63
  "@types/webpack-env": "1.16.0",
62
- "@typescript-eslint/eslint-plugin": "4.26.0",
63
- "@typescript-eslint/parser": "4.26.0",
64
+ "@typescript-eslint/eslint-plugin": "5.0.0",
65
+ "@typescript-eslint/parser": "5.0.0",
64
66
  "codecov": "3.8.2",
65
- "eslint": "7.28.0",
67
+ "dpdm": "3.7.1",
68
+ "eslint": "7.32.0",
66
69
  "eslint-plugin-header": "3.1.1",
67
- "eslint-plugin-import": "2.23.4",
70
+ "eslint-plugin-node": "11.1.0",
68
71
  "gh-pages": "3.2.0",
69
- "gts": "3.1.0",
70
72
  "istanbul-instrumenter-loader": "3.0.1",
71
73
  "karma": "5.2.3",
72
74
  "karma-chrome-launcher": "3.1.0",
@@ -81,8 +83,8 @@
81
83
  "sinon": "11.1.1",
82
84
  "ts-loader": "8.2.0",
83
85
  "ts-mocha": "8.0.0",
84
- "typedoc": "0.21.0-beta.1",
85
- "typescript": "4.3.2",
86
+ "typedoc": "0.21.2",
87
+ "typescript": "4.3.5",
86
88
  "webpack": "4.46.0"
87
89
  }
88
90
  }