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

SFTP dependency tree not available with applicationinsights-agent-3.5.2 #3697

Closed
abhikt48 opened this issue May 16, 2024 · 5 comments
Closed

Comments

@abhikt48
Copy link

Expected behavior

Dependency tree should be available with SFTP. Does applicationinsights-agent supports SFTP ?

Actual behavior

Dependency tree is not populating with SFTP transport.

To Reproduce

Refer mule4-ai-sftp-test

System information

Please provide the following information:

  • SDK Version: applicationinsights-agent-3.5.2
  • OS type and version: Windows
  • Application Server type and version (if applicable):
  • Using spring-boot? No
  • Additional relevant libraries (with version, if applicable): Mule 4.6.1

Logs

Refer applicationinsights.log

@jeanbisutti
Copy link
Member

SFTP dependencies are not automatically collected : https://learn.microsoft.com/azure/azure-monitor/app/opentelemetry-add-modify?tabs=java

See https://opentelemetry.io/docs/languages/java/instrumentation/ for manual instrumentation

@abhikt48
Copy link
Author

@jeanbisutti, thank you for the details. We are using the MuleSoft library to connect to SFTP servers, and we are unable to modify its codebase.

It seems that manual instrumentation is only possible if the library code can be modified, allowing us to initialize OpenTelemetry settings to enable SFTP logging.

Is this correct? Or do we have any other options to initialize OpenTelemetry outside of the SFTP connector library?

@abhikt48
Copy link
Author

@jeanbisutti One more point to add in above question,

  1. As We are using codeless agent, Can we use this manual setup in conjunction with codeless agent ?
  2. Is it correct that manual instrumentation is only possible if the library code can be modified, allowing us to initialize OpenTelemetry settings to enable SFTP logging?

@jeanbisutti
Copy link
Member

jeanbisutti commented Jun 3, 2024

@abhikt48

SFTP calls are not instrumented by the Java agent: https://learn.microsoft.com/azure/azure-monitor/app/opentelemetry-add-modify?tabs=java

You could use the Java agent and create spans for each SFTP call from your application code: https://opentelemetry.io/docs/languages/java/instrumentation/#create-spans

The tracer can be retrieved from GlobalOpenTelemetry:

import io.opentelemetry.api.GlobalOpenTelemetry;
Tracer tracer = GlobalOpenTelemetry.getTracer("instrumentation-scope-name", "instrumentation-scope-version");

https://central.sonatype.com/artifact/io.opentelemetry/opentelemetry-api

Copy link
Contributor

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants