-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #1574: [Bug] - Span attributes not added when obfuscator is en…
…abled (#1575) * fix(tracing): attribute values are converted accordingly to supported types in the IObfuscatory [#1574] * fix(tracing):: refactor IObfuscatory and implement appropriate tests [#1574] * fix(tracing): refactor endpoint padding of exporters [#1574]
- Loading branch information
Heiko Holz
authored
Feb 9, 2023
1 parent
64fa146
commit 9d97570
Showing
14 changed files
with
333 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
inspectit-ocelot-config/src/main/java/rocks/inspectit/ocelot/config/utils/EndpointUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package rocks.inspectit.ocelot.config.utils; | ||
|
||
/** | ||
* Utility class for OpenTelemetry endpoints. | ||
*/ | ||
public class EndpointUtils { | ||
|
||
/** | ||
* Transforms the given {@code endpoint} to meet OTEL's requirement to start with either 'http://' or 'https://'. | ||
* E.g., the {@code endpoint} 'localhost:4317' will be returned as 'http://localhost:4317'. | ||
* If the {@code endpoint} starts with 'http://' or 'https://', it will be returned unchanged. | ||
* | ||
* @param endpoint | ||
* | ||
* @return The padded endpoint | ||
*/ | ||
public static String padEndpoint(String endpoint) { | ||
return endpoint == null || endpoint.isEmpty() || endpoint.startsWith("http") ? endpoint : String.format("http://%s", endpoint); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.