Skip to content

Commit e1d9690

Browse files
authored
[Code health] Remove Unicode Text from Source files (open-telemetry#2707)
Signed-off-by: perhapsmaple <[email protected]>
1 parent aff26ac commit e1d9690

File tree

6 files changed

+11
-10
lines changed

6 files changed

+11
-10
lines changed

api/include/opentelemetry/baggage/baggage.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright The OpenTelemetry Authors
1+
// Copyright The OpenTelemetry Authors
22
// SPDX-License-Identifier: Apache-2.0
33

44
#pragma once

api/include/opentelemetry/context/context.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright The OpenTelemetry Authors
1+
// Copyright The OpenTelemetry Authors
22
// SPDX-License-Identifier: Apache-2.0
33

44
#pragma once

api/include/opentelemetry/context/runtime_context.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright The OpenTelemetry Authors
1+
// Copyright The OpenTelemetry Authors
22
// SPDX-License-Identifier: Apache-2.0
33

44
#pragma once

ext/test/http/url_parser_test.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ TEST(UrlDecoderTests, BasicTests)
140140
std::map<std::string, std::string> testdata{
141141
{"Authentication=Basic xxx", "Authentication=Basic xxx"},
142142
{"Authentication=Basic%20xxx", "Authentication=Basic xxx"},
143-
{"%C3%B6%C3%A0%C2%A7%C3%96abcd%C3%84", "öà§ÖabcdÄ"},
143+
{"%C3%B6%C3%A0%C2%A7%C3%96abcd%C3%84",
144+
"\xc3\xb6\xc3\xa0\xc2\xa7\xc3\x96\x61\x62\x63\x64\xc3\x84"},
144145
{"%2x", "%2x"},
145146
{"%20", " "},
146147
{"text%2", "text%2"},

opentracing-shim/src/span_shim.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void SpanShim::Log(opentracing::SystemTime timestamp,
111111
void SpanShim::logImpl(nostd::span<const EventEntry> fields,
112112
const opentracing::SystemTime *const timestamp) noexcept
113113
{
114-
// The Add Events name parameter MUST be the value with the event key
114+
// The Add Event's name parameter MUST be the value with the event key
115115
// in the pair set, or else fallback to use the log literal string.
116116
const auto &event = std::find_if(fields.begin(), fields.end(),
117117
[](const EventEntry &item) { return item.first == "event"; });

sdk/test/metrics/instrument_metadata_validator_test.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ TEST(InstrumentMetadataValidator, TestName)
1919
{
2020
opentelemetry::sdk::metrics::InstrumentMetaDataValidator validator;
2121
std::vector<std::string> invalid_names = {
22-
"", // empty string
23-
"1sdf", // string starting with number
24-
"123€AAA€BBB", // unicode characters
22+
"", // empty string
23+
"1sdf", // string starting with number
24+
"\x31\x32\x33\xe2\x82\xac\x41\x41\x41\xe2\x82\xac\x42\x42\x42" // unicode characters
2525
"/\\sdsd", // string starting with special character
2626
"***sSSs", // string starting with special character
2727
"a\\broken\\path", // contains backward slash
2828
CreateVeryLargeString(25) + "X", // total 256 characters
29-
CreateVeryLargeString(26), // string much bigger than 255 characters
29+
CreateVeryLargeString(26), // string much bigger than 255 character
3030
};
3131
for (auto const &str : invalid_names)
3232
{
@@ -56,7 +56,7 @@ TEST(InstrumentMetadataValidator, TestUnit)
5656
std::vector<std::string> invalid_units = {
5757
CreateVeryLargeString(5) + "ABCERTYGJ", // total 64 charactes
5858
CreateVeryLargeString(7), // string bigger than 63 chars
59-
"123€AAA€BBB", // unicode string
59+
"\x31\x32\x33\xe2\x82\xac\x41\x41\x41\xe2\x82\xac\x42\x42\x42", // unicode string
6060
};
6161
for (auto const &str : invalid_units)
6262
{

0 commit comments

Comments
 (0)