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

Upgrade Semantic Convention handling in AWS libraries. #2367

Merged
merged 35 commits into from
Dec 20, 2024
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
0d5c59b
upgrade semantic convention
ppittle Oct 18, 2024
4e8d265
Use a builder pattern for resource attributes
ppittle Nov 5, 2024
59a6a9f
improve documentation
ppittle Dec 3, 2024
67c2b03
inline attribute strings and update obsolete attributes
ppittle Dec 3, 2024
d248279
Alternate strategy to simplify implementation
ppittle Dec 4, 2024
7658b78
renamed files to reflect decision to user simpler model for managing …
ppittle Dec 5, 2024
928f4f1
move the upgrade of AttributeHttpTarget to a new PR as this will requ…
ppittle Dec 5, 2024
b52cbc5
add new unit tests for SemanticConventionVersion switching
ppittle Dec 5, 2024
749f5dd
update AWS Lambda tests to use Semantic Convention 1.29
ppittle Dec 5, 2024
0c091f2
remove obsolete code
ppittle Dec 6, 2024
5204ab7
Update SetTag to be a no-op if attribute name is null or empty
ppittle Dec 6, 2024
a7be302
Update documentation and add documentation to README files
ppittle Dec 6, 2024
db38b54
run dotnet format
ppittle Dec 6, 2024
bc32e39
fix minor issues found by unit tests
ppittle Dec 7, 2024
31700b8
Update Instrumentation.AWS.Tests to use Semantic Convention 1.29
ppittle Dec 7, 2024
bb6315a
Change SemanticConventionVersion to track Semantic Convention versions
ppittle Dec 6, 2024
62e75e8
move depreication of AttributeHttpTarget to new PR
ppittle Dec 7, 2024
0387cb2
implement AttirbuteHttpTarget
ppittle Dec 7, 2024
071f0b3
update AWS Lambda tests to use Semantic Convention 1.29
ppittle Dec 7, 2024
f180dd2
change whitespace to improve readability
ppittle Dec 9, 2024
b7b251b
rebase change semnatic versions to track
ppittle Dec 10, 2024
2bc2930
adjust strategy to list attributes as obsolete and add additional Add…
ppittle Dec 10, 2024
82bae2a
change SemenaticCvonentionVersion strategy to pin to v1.27 - the curr…
ppittle Dec 10, 2024
0eb9e87
SemanticConventionsVersion is public in multiple repositories and so…
ppittle Dec 10, 2024
da6c620
run dotnet format
ppittle Dec 10, 2024
1a1f9d9
change AWSemanticConventions from a static to instances to improve te…
ppittle Dec 10, 2024
fc58a67
Update src/OpenTelemetry.Instrumentation.AWS/README.md
ppittle Dec 12, 2024
de586e4
Update changelog
ppittle Dec 13, 2024
671dfbf
change casing of
ppittle Dec 13, 2024
42a6d0a
inline documentation from opentelemetry.semanticconventions and remov…
ppittle Dec 13, 2024
d72c650
Update libraries to impelement Semantic Convention 1.28 and 1.29
ppittle Dec 17, 2024
abad591
no longer include common SemanticConventions file
ppittle Dec 19, 2024
189e873
drop the suffix expiremental in enum values and instead metnion exper…
ppittle Dec 19, 2024
d70a0c5
change strategy - beta version will default to Legacy (ie no change i…
ppittle Dec 19, 2024
8d75bfd
Update src/OpenTelemetry.Instrumentation.AWS/CHANGELOG.md
ppittle Dec 19, 2024
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
Prev Previous commit
Next Next commit
update AWS Lambda tests to use Semantic Convention 1.29
ppittle committed Dec 19, 2024
commit 071f0b3fa1eb4d08da4e68904332c0eb167cff3a
Original file line number Diff line number Diff line change
@@ -41,7 +41,8 @@ public void GetHttpTags_APIGatewayProxyRequest_ReturnsCorrectTags()
var expectedTags = new Dictionary<string, object>
{
{ ExpectedSemanticConventions.AttributeHttpScheme, "https" },
{ ExpectedSemanticConventions.AttributeHttpTarget, "/path/test?q1=value1" },
{ ExpectedSemanticConventions.AttributeUrlPath, "/path/test" },
{ ExpectedSemanticConventions.AttributeUrlQuery, "?q1=value1" },
{ ExpectedSemanticConventions.AttributeNetHostName, "localhost" },
{ ExpectedSemanticConventions.AttributeNetHostPort, 1234 },
{ ExpectedSemanticConventions.AttributeHttpMethod, "GET" },
@@ -73,7 +74,8 @@ public void GetHttpTags_ApplicationLoadBalancerRequest_ReturnsCorrectTags()
var expectedTags = new Dictionary<string, object>
{
{ ExpectedSemanticConventions.AttributeHttpScheme, "https" },
{ ExpectedSemanticConventions.AttributeHttpTarget, "/path/test?q1=value1" },
{ ExpectedSemanticConventions.AttributeUrlPath, "/path/test" },
{ ExpectedSemanticConventions.AttributeUrlQuery, "?q1=value1" },
{ ExpectedSemanticConventions.AttributeNetHostName, "localhost" },
{ ExpectedSemanticConventions.AttributeNetHostPort, 1234 },
{ ExpectedSemanticConventions.AttributeHttpMethod, "GET" },
@@ -107,7 +109,8 @@ public void GetHttpTags_ApplicationLoadBalancerRequestWithMultiValue_ReturnsCorr
var expectedTags = new Dictionary<string, object>
{
{ ExpectedSemanticConventions.AttributeHttpScheme, "https" },
{ ExpectedSemanticConventions.AttributeHttpTarget, "/path/test?q1=value1" },
{ ExpectedSemanticConventions.AttributeUrlPath, "/path/test" },
{ ExpectedSemanticConventions.AttributeUrlQuery, "?q1=value1" },
{ ExpectedSemanticConventions.AttributeNetHostName, "localhost" },
{ ExpectedSemanticConventions.AttributeNetHostPort, 1234 },
{ ExpectedSemanticConventions.AttributeHttpMethod, "GET" },
@@ -132,7 +135,8 @@ public void GetHttpTags_ApplicationLoadBalancerRequestWithMultiValueHeader_UsesL

var expectedTags = new Dictionary<string, object>
{
{ ExpectedSemanticConventions.AttributeHttpTarget, string.Empty },
{ ExpectedSemanticConventions.AttributeUrlPath, string.Empty },
{ ExpectedSemanticConventions.AttributeUrlQuery, string.Empty },
{ ExpectedSemanticConventions.AttributeHttpScheme, "http" },
{ ExpectedSemanticConventions.AttributeNetHostName, "myhost" },
{ ExpectedSemanticConventions.AttributeNetHostPort, 432 },
@@ -238,7 +242,8 @@ public void GetHttpTags_APIGatewayProxyRequestWithEmptyContext_ReturnsTagsFromRe
var expectedTags = new Dictionary<string, object>
{
{ ExpectedSemanticConventions.AttributeHttpMethod, "POST" },
{ ExpectedSemanticConventions.AttributeHttpTarget, "/path/test?q1=value1" },
{ ExpectedSemanticConventions.AttributeUrlPath, "/path/test" },
{ ExpectedSemanticConventions.AttributeUrlQuery, "?q1=value1" },
};

AssertTags(expectedTags, actualTags);
@@ -260,7 +265,8 @@ public void GetHttpTags_APIGatewayProxyRequestWithMultiValueHeader_UsesLastValue

var expectedTags = new Dictionary<string, object>
{
{ ExpectedSemanticConventions.AttributeHttpTarget, string.Empty },
{ ExpectedSemanticConventions.AttributeUrlPath, string.Empty },
{ ExpectedSemanticConventions.AttributeUrlQuery, string.Empty },
{ ExpectedSemanticConventions.AttributeHttpScheme, "http" },
{ ExpectedSemanticConventions.AttributeNetHostName, "myhost" },
{ ExpectedSemanticConventions.AttributeNetHostPort, 432 },
@@ -295,7 +301,8 @@ public void GetHttpTags_APIGatewayHttpApiV2ProxyRequest_ReturnsCorrectTags()
var expectedTags = new Dictionary<string, object>
{
{ ExpectedSemanticConventions.AttributeHttpScheme, "https" },
{ ExpectedSemanticConventions.AttributeHttpTarget, "/path/test?q1=value1" },
{ ExpectedSemanticConventions.AttributeUrlPath, "/path/test" },
{ ExpectedSemanticConventions.AttributeUrlQuery, "?q1=value1" },
{ ExpectedSemanticConventions.AttributeNetHostName, "localhost" },
{ ExpectedSemanticConventions.AttributeNetHostPort, 1234 },
{ ExpectedSemanticConventions.AttributeHttpMethod, "GET" },
@@ -320,7 +327,8 @@ public void GetHttpTags_APIGatewayHttpApiV2ProxyRequestWithMultiValueHeader_Uses

var expectedTags = new Dictionary<string, object>
{
{ ExpectedSemanticConventions.AttributeHttpTarget, string.Empty },
{ ExpectedSemanticConventions.AttributeUrlPath, string.Empty },
{ ExpectedSemanticConventions.AttributeUrlQuery, string.Empty },
{ ExpectedSemanticConventions.AttributeHttpScheme, "http" },
{ ExpectedSemanticConventions.AttributeNetHostName, "myhost" },
{ ExpectedSemanticConventions.AttributeNetHostPort, 432 },
@@ -458,7 +466,8 @@ private static void AssertTags<TActualValue>(Dictionary<string, object> expected
private static class ExpectedSemanticConventions
{
public const string AttributeHttpScheme = "url.scheme";
public const string AttributeHttpTarget = "http.target";
public const string AttributeUrlPath = "url.path";
public const string AttributeUrlQuery = "url.query";
public const string AttributeNetHostName = "server.address";
public const string AttributeNetHostPort = "server.port";
public const string AttributeHttpMethod = "http.request.method";
Original file line number Diff line number Diff line change
@@ -47,7 +47,8 @@ public void CanUseSemanticConvention1_10_1()
var expectedTags = new List<string>
{
"url.scheme",
"http.target",
"url.path",
"url.query",
"server.address",
"server.port",
"http.request.method",