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

azuremonitorexporter not working with Java app logging #15275

Closed
jay-annapureddy opened this issue Oct 18, 2022 · 5 comments · Fixed by #15659
Closed

azuremonitorexporter not working with Java app logging #15275

jay-annapureddy opened this issue Oct 18, 2022 · 5 comments · Fixed by #15659
Labels
exporter/azuremonitor question Further information is requested

Comments

@jay-annapureddy
Copy link

Describe the issue you're reporting

Hi,

Issue
I found that this exporter is not working with Java app logging and log4j, could you please help here, is there any way I can send Java app logs to Azure Monitoring ?

Requirement: I am in a need of sending emitted telemetry data from a Java app to Azure monitor.

Details:
I am having a Java app instrumented with otel java agent and then I am using the otelcol-contrib collector azuremonitorexporter to send data to azure monitor

https://github.com/open-telemetry/opentelemetry-java-instrumentation

https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/exporter/azuremonitorexporter/v0.60.0/exporter/azuremonitorexporter

Note
I already explored azure application insights java agent but looking for vendor agnostic open telemetry instrumentation and sending data to backend

Error
Oct 18 20:30:03 depfVM1 otelcol-contrib[3036144]: 2022-10-18T20:30:03.043Z warn [email protected]/log_to_envelope.go:79 Unknown Severity Level {"kind": "exporter", "data_type": "logs", "name": "azuremonitor", "Severity Level": "INFO>

Attached files are file exporter output and otelcol-contrib configuration

file-ouput.txt
config.txt

@jay-annapureddy jay-annapureddy added the needs triage New item requiring triage label Oct 18, 2022
@evan-bradley evan-bradley added question Further information is requested exporter/azuremonitor and removed needs triage New item requiring triage labels Oct 19, 2022
@github-actions
Copy link
Contributor

Pinging code owners: @pcwiese. See Adding Labels via Comments if you do not have permissions to add labels yourself.

@pcwiese
Copy link
Contributor

pcwiese commented Oct 19, 2022

Looks like there is a severity map that is used to map the incoming log record to an appinsights/azure monitor level

var severityLevelMap = map[string]contracts.SeverityLevel{

so, in your case INFO must be Information for the current code to map it properly I guess.

@eedorenko added this feature. Is this a valid mapping? Something is obviously off here

@eedorenko
Copy link
Contributor

I will look into that

@jay-annapureddy
Copy link
Author

@mx-psi
Copy link
Member

mx-psi commented Oct 26, 2022

Releases happen every other Wednesday https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/release.md#release-schedule, there will be one today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exporter/azuremonitor question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants