Skip to content

Commit

Permalink
Fix format.
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonWeber committed Nov 20, 2024
1 parent 98713d8 commit 4ab8029
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ export function logToEnvelope(log: ReadableLogRecord, ikey: string): Envelope |
const instrumentationKey = ikey;
const tags = createTagsFromLog(log);
if (log.attributes[KnownContextTagKeys.AiOperationName]) {
tags[KnownContextTagKeys.AiOperationName] = log.attributes[KnownContextTagKeys.AiOperationName] as string;
tags[KnownContextTagKeys.AiOperationName] = log.attributes[
KnownContextTagKeys.AiOperationName
] as string;
}
// eslint-disable-next-line prefer-const
let [properties, measurements] = createPropertiesFromLog(log);
Expand Down Expand Up @@ -145,7 +147,7 @@ function createPropertiesFromLog(log: ReadableLogRecord): [Properties, Measureme
key === ATTR_EXCEPTION_TYPE ||
key === ATTR_EXCEPTION_MESSAGE ||
key === ATTR_EXCEPTION_STACKTRACE ||
key === KnownContextTagKeys.AiOperationName as string
key === (KnownContextTagKeys.AiOperationName as string)
)
) {
properties[key] = serializeAttribute(log.attributes[key]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ function createTagsFromSpan(span: ReadableSpan): Tags {
}
} else {
if (span.attributes[KnownContextTagKeys.AiOperationName]) {
tags[KnownContextTagKeys.AiOperationName] = span.attributes[KnownContextTagKeys.AiOperationName] as string;
tags[KnownContextTagKeys.AiOperationName] = span.attributes[
KnownContextTagKeys.AiOperationName
] as string;
}
}
// TODO: Location IP TBD for non server spans
Expand Down Expand Up @@ -146,7 +148,7 @@ function createPropertiesFromSpanAttributes(attributes?: Attributes): {
key === SEMATTRS_EXCEPTION_TYPE ||
key === SEMATTRS_EXCEPTION_MESSAGE ||
key === SEMATTRS_EXCEPTION_STACKTRACE ||
key === KnownContextTagKeys.AiOperationName as string
key === (KnownContextTagKeys.AiOperationName as string)
)
) {
properties[key] = serializeAttribute(attributes[key]);
Expand Down

0 comments on commit 4ab8029

Please sign in to comment.