Skip to content
This repository was archived by the owner on Apr 19, 2026. It is now read-only.

Extended SetAttribute() method to include all integer types#6

Merged
IlyaKobelevskiy merged 4 commits into
GoogleCloudPlatform:masterfrom
snehilchopra:extend_attributes
Aug 12, 2020
Merged

Extended SetAttribute() method to include all integer types#6
IlyaKobelevskiy merged 4 commits into
GoogleCloudPlatform:masterfrom
snehilchopra:extend_attributes

Conversation

@snehilchopra
Copy link
Copy Markdown
Contributor

Added code to cover all integer types for the GCP recordable.
Added test coverage for the same.

Comment thread exporters/trace/gcp_exporter/recordable.h Outdated
Comment thread exporters/trace/gcp_exporter/internal/recordable_test.cc Outdated
Comment thread exporters/trace/gcp_exporter/internal/recordable.cc Outdated
Comment thread exporters/trace/gcp_exporter/internal/recordable.cc
{
(void)name;
(void)timestamp;
(void)attributes;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I go with unnamed parameters here and below?
Not sure what the specification is under the GCP org for unused parameters.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure what is the spec, but I think those parameters are unused for a short term.
Eventually this code AddEvent should eventually map to a TimeEvent (https://cloud.google.com/trace/docs/reference/v2/rpc/google.devtools.cloudtrace.v2#timeevent).

Copy link
Copy Markdown

@IlyaKobelevskiy IlyaKobelevskiy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, just one minor nit.

const common::AttributeValue &value) noexcept
{
// Get the protobuf span's map
auto map = span_.mutable_attributes()->mutable_attribute_map();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto -> auto* for better readability

{
(void)name;
(void)timestamp;
(void)attributes;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure what is the spec, but I think those parameters are unused for a short term.
Eventually this code AddEvent should eventually map to a TimeEvent (https://cloud.google.com/trace/docs/reference/v2/rpc/google.devtools.cloudtrace.v2#timeevent).

@IlyaKobelevskiy IlyaKobelevskiy merged commit 03ea139 into GoogleCloudPlatform:master Aug 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants