Skip to content

Ability to programmatically attach to own JVM #2125

Closed
@robrez

Description

@robrez

Problem

Would like parity with the dotnet cohorts who are able to add applicationinsights as a dependency and programatically add instrumentation to an application, example

For java, it seems like the only vended option is to use a javaagent at startup. Would like the ability to do something like this:

  public static void main(String[] args) throws IOException {
    ApplicationInsights.attach();
    SpringApplication.run(SpringBootApp.class, args);
  }

Potential Solution

The snippet above is from this codebase, but it's inside test packages

I don't mean to link to a competitor.. but this source is apache2-licensed and offers another example

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions