File tree Expand file tree Collapse file tree 15 files changed +813
-1255
lines changed
opentelemetry-context-base
test/noop-implementations Expand file tree Collapse file tree 15 files changed +813
-1255
lines changed Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ async function doSomething() {
133133 } catch (err) {
134134 span .setStatus ({
135135 // use an appropriate status code here
136- code: api .StatusCode .ERROR ,
136+ code: api .SpanStatusCode .ERROR ,
137137 message: err .message ,
138138 });
139139 span .end ();
Original file line number Diff line number Diff line change 1414 * limitations under the License.
1515 */
1616
17- import { EntryValue } from './EntryValue' ;
17+ import { BaggageEntryValue } from './EntryValue' ;
1818
1919/**
2020 * Baggage represents collection of entries. Each key of
@@ -25,5 +25,5 @@ import { EntryValue } from './EntryValue';
2525 * dimension to the metric or additional contest properties to logs and traces.
2626 */
2727export interface Baggage {
28- [ entryKey : string ] : EntryValue ;
28+ [ entryKey : string ] : BaggageEntryValue ;
2929}
Original file line number Diff line number Diff line change 1313 * See the License for the specific language governing permissions and
1414 * limitations under the License.
1515 */
16- export interface EntryValue {
17- /** `String` value of the `EntryValue `. */
16+ export interface BaggageEntryValue {
17+ /** `String` value of the `BaggageEntryValue `. */
1818 value : string ;
1919 /**
2020 * ttl is an integer that represents number of hops an entry can
2121 * propagate.
2222 */
23- ttl ?: EntryTtl ;
23+ ttl ?: BaggageEntryTtl ;
2424}
2525
2626/**
27- * EntryTtl is an integer that represents number of hops an entry can propagate.
27+ * BaggageEntryTtl is an integer that represents number of hops an entry can propagate.
2828 *
2929 * For now, ONLY special values (0 and -1) are supported.
3030 */
31- export enum EntryTtl {
31+ export enum BaggageEntryTtl {
3232 /**
3333 * NO_PROPAGATION is considered to have local context and is used within the
3434 * process it created.
Original file line number Diff line number Diff line change 1414 * limitations under the License.
1515 */
1616
17- import { Attributes } from './attributes' ;
17+ import { SpanAttributes } from './attributes' ;
1818
1919/** A text annotation with a set of attributes. */
2020export interface Event {
2121 /** The name of the event. */
2222 name : string ;
2323 /** The attributes of the event. */
24- attributes ?: Attributes ;
24+ attributes ?: SpanAttributes ;
2525}
Original file line number Diff line number Diff line change 1616
1717import { Exception } from '../common/Exception' ;
1818import { TimeInput } from '../common/Time' ;
19- import { Attributes } from './attributes' ;
19+ import { SpanAttributes } from './attributes' ;
2020import { Span } from './span' ;
2121import { SpanContext } from './span_context' ;
22- import { Status } from './status' ;
22+ import { SpanStatus } from './status' ;
2323import { INVALID_SPAN_CONTEXT } from './spancontext-utils' ;
2424
2525/**
@@ -43,17 +43,17 @@ export class NoopSpan implements Span {
4343 }
4444
4545 // By default does nothing
46- setAttributes ( _attributes : Attributes ) : this {
46+ setAttributes ( _attributes : SpanAttributes ) : this {
4747 return this ;
4848 }
4949
5050 // By default does nothing
51- addEvent ( _name : string , _attributes ?: Attributes ) : this {
51+ addEvent ( _name : string , _attributes ?: SpanAttributes ) : this {
5252 return this ;
5353 }
5454
5555 // By default does nothing
56- setStatus ( _status : Status ) : this {
56+ setStatus ( _status : SpanStatus ) : this {
5757 return this ;
5858 }
5959
Original file line number Diff line number Diff line change 1515 */
1616
1717import { Context } from '@opentelemetry/context-base' ;
18- import { Attributes } from './attributes' ;
18+ import { SpanAttributes } from './attributes' ;
1919import { Link } from './link' ;
2020import { SamplingResult } from './SamplingResult' ;
2121import { SpanKind } from './span_kind' ;
@@ -35,7 +35,7 @@ export interface Sampler {
3535 * span to be created starts a new trace.
3636 * @param spanName of the span to be created.
3737 * @param spanKind of the span to be created.
38- * @param attributes Initial set of Attributes for the Span being constructed.
38+ * @param attributes Initial set of SpanAttributes for the Span being constructed.
3939 * @param links Collection of links that will be associated with the Span to
4040 * be created. Typically useful for batch operations.
4141 * @returns a {@link SamplingResult}.
@@ -45,7 +45,7 @@ export interface Sampler {
4545 traceId : string ,
4646 spanName : string ,
4747 spanKind : SpanKind ,
48- attributes : Attributes ,
48+ attributes : SpanAttributes ,
4949 links : Link [ ]
5050 ) : SamplingResult ;
5151
Original file line number Diff line number Diff line change 1414 * limitations under the License.
1515 */
1616
17- import { Attributes } from './attributes' ;
17+ import { SpanAttributes } from './attributes' ;
1818
1919/**
2020 * A sampling decision that determines how a {@link Span} will be recorded
@@ -52,5 +52,5 @@ export interface SamplingResult {
5252 * Caller may call {@link Sampler}.shouldSample any number of times and
5353 * can safely cache the returned value.
5454 */
55- attributes ?: Readonly < Attributes > ;
55+ attributes ?: Readonly < SpanAttributes > ;
5656}
Original file line number Diff line number Diff line change 1515 */
1616
1717import { TimeInput } from '../common/Time' ;
18- import { Attributes } from './attributes' ;
18+ import { SpanAttributes } from './attributes' ;
1919import { Link } from './link' ;
2020import { SpanKind } from './span_kind' ;
2121
@@ -30,7 +30,7 @@ export interface SpanOptions {
3030 kind ?: SpanKind ;
3131
3232 /** A span's attributes */
33- attributes ?: Attributes ;
33+ attributes ?: SpanAttributes ;
3434
3535 /** {@link Link }s span to other spans */
3636 links ?: Link [ ] ;
You can’t perform that action at this time.
0 commit comments