question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Load agent without code change

See original GitHub issue

By implementing IHostingStartup and using the following two environment variables we could load the agent into an ASP.NET Core app without any code change or even recompilation:

  • DOTNET_ADDITIONAL_DEPS
  • ASPNETCORE_HOSTINGSTARTUPASSEMBLIES

I blogged about this feature here.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
gregkalaposcommented, Nov 13, 2019

Another question about this in discuss: https://discuss.elastic.co/t/instrument-any-net-core-application/207680

As discussed on discuss, in order to support ASP.NET Core 2.1 we’ll probably need IHostingStartup.

0reactions
gregkalaposcommented, Sep 1, 2020

Implemented in #828.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Starting Instrumentation Agent after VM Startup - java
An agent allows you to inject code into other processes, without changing stuff in the targets code. But if you are inside your...
Read more >
JEP 451: Prepare to Disallow the Dynamic Loading of Agents
This means altering the code in a class so that it emits events to be consumed by a tool outside the application, without...
Read more >
Building a dynamic instrumentation agent for Java
The Sqreen agent applies dynamic instrumentation in order to report and protect the application without code modification.
Read more >
Guide to Java Instrumentation
A guide to understanding Java Instrumentation and implementing custom agents.
Read more >
How to add extensions to the OpenTelemetry Java Agent
The agent doesn't modify the source code directly, but rather the bytecode that is loaded into the JVM. This is done while the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found