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

Extension v1 to v2 migration - endpoint configuration

pahofmann
DynaMight Guru
DynaMight Guru

I ran into a bit of an issue with migrating python extensions from v1 to v2 regarding the endpoint configuration.

The migration docs mention: "You can find and replace all self.config. entries with self.activation_config."

That led to empty fields and when checking out the activation_config I saw it has an array of endpoints with the config values.

That matches the example from Creating a Python extension, where it is iterated over the endpoints from self.activation_config["endpoints"] in the query method.

That would be a bigger change from v1 though, where the extension only knows about its current endpoint. And for a lot of extensions, I wouldn't be able to finish all endpoints in the 1 Minute query window.

Is this just a discrepancy in the docs or am I missing something else here?  

Hope someone has a quick pointer, I wasn't able to find anything else in the docs.

 

Dynatrace Certified Master - Dynatrace Partner - 360Performance.net
6 REPLIES 6

pahofmann
DynaMight Guru
DynaMight Guru

Hey @Nick-Montana 

Thanks, but that is not really related to my question about the endpoints of the extension.

 

The rest of the migration looks pretty straight forward. I'm using metrics v2 in my extensions anyway so v2 will just simplify things there. 

 

 

Dynatrace Certified Master - Dynatrace Partner - 360Performance.net

Mike_L
Dynatrace Guru
Dynatrace Guru

Hi,

You'd indeed have to add the endpoint loop if you want to have more than one endpoint in a monitoring configuration. If you only want one endpoint then that is fine as well. Keep in mind that in EF2.0 there is no 1 minute limitation anymore. Even more, each endpoint runs in its own thread so it's not subsequent.

Mike

Ah right, that's what I was missing. A lot more flexibility with that model, especially for longer running extensions with a higher interval, great!

 

Thanks for quick answer Mike!

Dynatrace Certified Master - Dynatrace Partner - 360Performance.net

The flexibility makes a huge difference indeed. You can even create listeners and such seeing as it's just a python program.

Mike

Thinking about it I got one more question. You wrote Each Endpoint runs in its own thread so it's not subsequent.

Is it each Endpoint or each Monitoring configuration?  The Endpoints can't really be separated if I have to iterate over the config in the query?

Dynatrace Certified Master - Dynatrace Partner - 360Performance.net

The monitoring configurations run in their own process.

Within that process you can spawn many threads, the schedule methods of the SDK handles that automatically for you.

Mike

Featured Posts