cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Obtain "Endpoint Name" in a v1 extension?

AntonioSousa
DynaMight Guru
DynaMight Guru

In extensions v1, how can I get the "Endpoint name" of the running thread? Is there a self.config[""] entry available for it, or is it available programmatically in some form?

Antonio Sousa
4 REPLIES 4

DavidMass
Dynatrace Mentor
Dynatrace Mentor

Hi @AntonioSousa
I believe you should be able to find both the endpoint name and id via self.activation : 

self.activation.endpoint_name
self.activation.entity_id

I would suggest to use the id as that should always be available.  

@DavidMass,

Thanks for the quick reply! I'll check them out.

Antonio Sousa

@DavidMass,

Worked perfectly. Does self.activation have more entries, as there seems to be no documentation about it?

Antonio Sousa

Hi @AntonioSousa
Glad to hear it!

Printing it or calling get_activation_context() you get this below (at least from the oneagent_sim). I'll see if I can find out any more information for you.

print(self.activation) : RemoteActivationContext(config_id=0x7b, endpoint=Test configuration, properties={'instance_cfg': 'simulator'}, enabled=True)

print(self.get_activation_context()) : RemoteActivationContext(config_id=0x7b, endpoint=Test configuration, properties={'instance_cfg': 'simulator'}, enabled=True)

 

Featured Posts