Skip to content

Commit

Permalink
FRW-9795 updated used attributes for generated spans
Browse files Browse the repository at this point in the history
  • Loading branch information
gechetspr committed Jan 23, 2025
1 parent 443703a commit 093661d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,15 @@ protected function getSafeAttributes(): array
TraceAttributes::NETWORK_PROTOCOL_VERSION,
TraceAttributes::SERVER_PORT,
TraceAttributes::SERVER_ADDRESS,
TraceAttributes::ERROR_TYPE,
TraceAttributes::EXCEPTION_MESSAGE,
TraceAttributes::URL_DOMAIN,
RedisInstrumentation::ATTRIBUTE_EVAL_SCRIPT,
ElasticaInstrumentation::ATTRIBUTE_QUERY_TIME,
ElasticaInstrumentation::ATTRIBUTE_SEARCH_INDEX,
ElasticaInstrumentation::ATTRIBUTE_SEARCH_ID,
ElasticaInstrumentation::ATTRIBUTE_SEARCH_IDS,
ElasticaInstrumentation::ATTRIBUTE_SEARCH_INDEXES,
TraceAttributes::URL_DOMAIN,
CriticalSpanRatioSampler::IS_CRITICAL_ATTRIBUTE,
CriticalSpanRatioSampler::NO_CRITICAL_ATTRIBUTE,
SprykerInstrumentationBootstrap::ATTRIBUTE_IS_DETAILED_TRACE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ function: \'%s\',
if ($exception !== null) {
$span->recordException($exception);
$span->setAttribute(\'error_message\', $exception->getMessage());
$span->setAttribute(\'error_code\', $exception->getCode());
$span->setAttribute(\\OpenTelemetry\\SemConv\\TraceAttributes::EXCEPTION_MESSAGE, $exception->getMessage());
$span->setAttribute(\\OpenTelemetry\\SemConv\\TraceAttributes::ERROR_TYPE, $exception->getCode());
}
$span->setStatus($exception !== null ? \\OpenTelemetry\\API\\Trace\\StatusCode::STATUS_ERROR : \\OpenTelemetry\\API\\Trace\\StatusCode::STATUS_OK);
Expand Down

0 comments on commit 093661d

Please sign in to comment.