Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[currency] - add span attributes #265

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/manual_span_attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ This document contains the list of manual Span Attributes used throughout the de

## CurrencyService

* None yet
* `app.currency.conversion.from`
* `app.currency.conversion.to`

## EmailService

Expand Down
3 changes: 3 additions & 0 deletions src/currencyservice/src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ class CurrencyService final : public hipstershop::CurrencyService::Service
getUnitsAndNanos(*response, final);
response->set_currency_code(to_code);

span->SetAttribute("app.currency.conversion.from", from_code);
span->SetAttribute("app.currency.conversion.to", to_code);

// End the span
span->AddEvent("Conversion successful, response sent back");
span->SetStatus(StatusCode::kOk);
Expand Down