Skip to content

Commit

Permalink
chore(shim-opentracing): better function name
Browse files Browse the repository at this point in the history
  • Loading branch information
vreynolds committed May 11, 2021
1 parent 873d6ab commit 399baba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/opentelemetry-shim-opentracing/src/shim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ export class SpanShim extends opentracing.Span {
*/
addTags(keyValueMap: SpanAttributes): this {
for (const [key, value] of Object.entries(keyValueMap)) {
if (this._setSpanStatusCode(key, value)) {
if (this._setErrorAsSpanStatusCode(key, value)) {
continue;
}
if (value !== undefined) {
Expand All @@ -318,7 +318,7 @@ export class SpanShim extends opentracing.Span {
* @param value value for the tag
*/
setTag(key: string, value: SpanAttributeValue): this {
if (this._setSpanStatusCode(key, value)) {
if (this._setErrorAsSpanStatusCode(key, value)) {
return this;
}

Expand All @@ -343,7 +343,7 @@ export class SpanShim extends opentracing.Span {
return this._span;
}

private _setSpanStatusCode(
private _setErrorAsSpanStatusCode(
key: string,
value: SpanAttributeValue | undefined
): boolean {
Expand Down

0 comments on commit 399baba

Please sign in to comment.