-
Notifications
You must be signed in to change notification settings - Fork 199
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
add logprocessor to agent #1713
Conversation
...rc/main/java/com/microsoft/applicationinsights/agent/internal/processors/AgentProcessor.java
Show resolved
Hide resolved
...rc/main/java/com/microsoft/applicationinsights/agent/internal/processors/AgentProcessor.java
Outdated
Show resolved
Hide resolved
...rc/main/java/com/microsoft/applicationinsights/agent/internal/processors/AgentProcessor.java
Outdated
Show resolved
Hide resolved
...rc/main/java/com/microsoft/applicationinsights/agent/internal/processors/AgentProcessor.java
Outdated
Show resolved
Hide resolved
...rc/main/java/com/microsoft/applicationinsights/agent/internal/processors/AgentProcessor.java
Outdated
Show resolved
Hide resolved
...va/com/microsoft/applicationinsights/agent/internal/processors/ExporterWithLogProcessor.java
Outdated
Show resolved
Hide resolved
...va/com/microsoft/applicationinsights/agent/internal/processors/ExporterWithLogProcessor.java
Outdated
Show resolved
Hide resolved
...a/com/microsoft/applicationinsights/agent/internal/processors/ExporterWithSpanProcessor.java
Outdated
Show resolved
Hide resolved
...src/main/java/com/microsoft/applicationinsights/agent/internal/processors/ProcessorUtil.java
Show resolved
Hide resolved
...a/com/microsoft/applicationinsights/agent/internal/wasbootstrap/OpenTelemetryConfigurer.java
Outdated
Show resolved
Hide resolved
note: missing copyrights for new classes. |
spans.add(spanData); | ||
exampleExporter.export(spans); | ||
|
||
// verify that resulting spans are not modified |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
spans.add(spanData); | ||
exampleExporter.export(spans); | ||
|
||
// verify that resulting logs are not modified |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
...rc/main/java/com/microsoft/applicationinsights/agent/internal/processors/AgentProcessor.java
Outdated
Show resolved
Hide resolved
5b7eed4
to
3561f01
Compare
…elemetryprocessorOpenTelemetryConfigurer
...ain/java/com/microsoft/applicationinsights/agent/internal/processors/AttributeProcessor.java
Outdated
Show resolved
Hide resolved
...ssors/src/smokeTest/java/com/microsoft/applicationinsights/smoketest/SpringBootAutoTest.java
Outdated
Show resolved
Hide resolved
test/smoke/testApps/SystemExit/src/smokeTest/resources/jre.excludes.txt
Outdated
Show resolved
Hide resolved
...a/com/microsoft/applicationinsights/test/fakeingestion/MockedAppInsightsIngestionServer.java
Outdated
Show resolved
Hide resolved
...rc/main/java/com/microsoft/applicationinsights/agent/internal/processors/AgentProcessor.java
Outdated
Show resolved
Hide resolved
...m/microsoft/applicationinsights/agent/internal/wasbootstrap/configuration/Configuration.java
Outdated
Show resolved
Hide resolved
test/smoke/appServers/global-resources/telemetryprocessors_applicationinsights.json
Outdated
Show resolved
Hide resolved
...ryProcessors/src/main/java/com/microsoft/applicationinsights/smoketestapp/SpringBootApp.java
Outdated
Show resolved
Hide resolved
...ssors/src/smokeTest/java/com/microsoft/applicationinsights/smoketest/SpringBootAutoTest.java
Outdated
Show resolved
Hide resolved
test/smoke/appServers/global-resources/telemetryprocessors_applicationinsights.json
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @kryalama! ❤️
MessageData md1 = logs.get(0); | ||
assertEquals("smoketestappcontroller::INFO",md1.getMessage()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
"name": { | ||
"body": { | ||
"fromAttributes": [ | ||
"applicationinsights.internal.logger_name","applicationinsights.internal.log_level" | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be nice to instead test the PII data redaction scenario, but we can do that in follow-up PR later
} | ||
|
||
//fromAttributes represents the attribute keys to pull the values from to generate the new span name. | ||
public SpanData processFromAttributes(SpanData log) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably could have avoided some of the copy paste here by extracting out another common method into ProcessorUtil, but let's do that later in follow-up PR
* add logprocessor to agent * comments addressed, added smoketest for log processor, fixed bug in telemetryprocessorOpenTelemetryConfigurer * StringBuffer -> StringBuilder * addressing comments * removed lognames, fixed smoke test * replace name with body in log processor, address comments Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
* Support agentmain (#1687) * Use ProfilerEndpoint from connection string (#1694) * Add test to make sure no non-daemon threads (#1695) * Better EventHubs support (#1698) * Reduce spammy error (#1701) * Emit Profiler start/stop events (#1706) * 2.x SDK explicit operation id / operation parent id should take precedence (#1708) * Support explicit operation id/parentId from 2.x * Test * Release 3.1.1-BETA.2 (#1709) * Prepare for a new beta release * Fix a typo * Reword Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com> * Hide super advanced feature. Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com> Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com> * Better Azure Service Bus support (#1710) * Use main as the default branch from now on (#1715) * Retry webflux tests 3 times when it's failing (#1712) * Retry webflux 3 times when it's failing * print stack trace when the final retry fails * Reword Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com> Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com> * Update to latest OTel (#1719) * Update OTel * Suppress 2.x request name handler * Remove retry * Suppress CDS Profile endpoint warning in smoke tests * Bump timeout to avoid sporadic failures * Prepare 3.1.1-BETA.3 release (#1723) * Fix App Map display of unknown dependencies (#1716) * Fix App Map display of unknown dependencies * Add net peer mapping to target also * Add clarifying comment * Fix agent jar size (#1724) * Fix agent jar size * Bump version * Add roleName to profile metadata (#1725) * add a unique id for GC events so that events from a single JVM can be grouped (#1721) * Fix 2.x interop of timestamps (#1726) * Fix 2.x interop of timestamps * Add smoke test * Bump version * add logprocessor to agent (#1713) * add logprocessor to agent * comments addressed, added smoketest for log processor, fixed bug in telemetryprocessorOpenTelemetryConfigurer * StringBuffer -> StringBuilder * addressing comments * removed lognames, fixed smoke test * replace name with body in log processor, address comments Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com> Co-authored-by: John Oliver <1615532+johnoliver@users.noreply.github.com> Co-authored-by: Helen Y <56097766+heyams@users.noreply.github.com> Co-authored-by: kryalama <66494519+kryalama@users.noreply.github.com>
add log processor to agent.
attaching SNAPSHOT build for testing: applicationinsights-agent-3.1.1-BETA.5-SNAPSHOT.jar.zip