Skip to content

Commit e7f6825

Browse files
mayurkale22rochdev
andauthored
Span: Add setAttributes operation (open-telemetry#44)
* Span: Add setAttributes operation * Update packages/opentelemetry-types/src/trace/span.ts Co-Authored-By: Roch Devost <[email protected]>
1 parent d99af90 commit e7f6825

File tree

1 file changed

+8
-0
lines changed
  • packages/opentelemetry-types/src/trace

1 file changed

+8
-0
lines changed

packages/opentelemetry-types/src/trace/span.ts

+8
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import { SpanContext } from './span_context';
1818
import { Status } from './status';
19+
import { Attributes } from './attributes';
1920

2021
/**
2122
* An interface that represents a span. A span represents a single operation
@@ -47,6 +48,13 @@ export interface Span {
4748
*/
4849
setAttribute(key: string, value: unknown): this;
4950

51+
/**
52+
* Sets attributes to the span.
53+
*
54+
* @param attributes the attributes that will be added.
55+
*/
56+
setAttributes(attributes: Attributes): this;
57+
5058
/**
5159
* Adds an event to the Span.
5260
*

0 commit comments

Comments
 (0)