EventListener
, org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
public class BeelineMetaFieldProvider extends Object implements org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
To break this cycle, we use Spring's @Lazy annotation, which means the instrumentation list is effectively a placeholder and not usable until the application context is fully initialised - it will throw exceptions upon any interaction with it.
In order to make invocations of this class safe even before the context is ready, we use the isInit
flag
as a guard. It flips when we get the ContextRefreshedEvent
.
Constructor | Description |
---|---|
BeelineMetaFieldProvider(String packageName,
String packageVersion,
String beelineVersion,
String localHostname,
List<BeelineInstrumentation> instrumentations) |
Modifier and Type | Method | Description |
---|---|---|
String |
getBeelineVersion() |
|
Map<String,io.honeycomb.libhoney.ValueSupplier<?>> |
getDynamicFields() |
|
int |
getInstrumentationCount() |
|
Set<String> |
getInstrumentations() |
|
String |
getLocalHostname() |
|
String |
getPackageName() |
|
String |
getPackageVersion() |
|
Map<String,?> |
getStaticFields() |
|
void |
onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event) |
public String getPackageName()
public String getPackageVersion()
public String getBeelineVersion()
@Nullable public String getLocalHostname()
public int getInstrumentationCount()
public void onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)
onApplicationEvent
in interface org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
Copyright © 2019–2020 Honeycomb. All rights reserved.