# Extension v1 to v2 migration - endpoint configuration

**URL:** <https://community.dynatrace.com/t/extension-v1-to-v2-migration-endpoint-configuration/46108>\
**Category:** Extensions\
**Tags:** python, extensions\
**Created:** [June 13, 2024, 2:34pm UTC](https://community.dynatrace.com/t/extension-v1-to-v2-migration-endpoint-configuration/46108 "2024-06-13T14:34:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pahofmann](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pahofmann/32/17076_2.png) [@pahofmann](https://community.dynatrace.com/u/pahofmann)\
**Post date:** [June 13, 2024, 2:34pm UTC](https://community.dynatrace.com/t/extension-v1-to-v2-migration-endpoint-configuration/46108/1 "2024-06-13T14:34:00Z")

</div>

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

The [migration docs](https://developer.dynatrace.com/extensions-v2/dynatrace-extensions-vscode/guides/migrate/python-migrate/#change-the-extension-code) mention:&nbsp;“_You can find and replace all self.config. entries with self.activation\_config_.”

That led to empty fields and when checking out the&nbsp;_activation\_config_ I saw&nbsp;it has an array of endpoints with the config values.

That matches the example from [Creating a Python extension](https://developer.dynatrace.com/extensions-v2/dynatrace-extensions-vscode/guides/create_extension/#final-code), 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.

---

<div class="post-metadata">

**Author:** ![pahofmann](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pahofmann/32/17076_2.png) [@pahofmann](https://community.dynatrace.com/u/pahofmann)\
**Post date:** [June 14, 2024, 7:49am UTC](https://community.dynatrace.com/t/extension-v1-to-v2-migration-endpoint-configuration/46108/2 "2024-06-14T07:49:02Z")

</div>

Hey&nbsp;[@Nick-Montana](https://community.dynatrace.com/user/48870)

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.

---

<div class="post-metadata">

**Author:** ![Mike\_L](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mike_l/32/11717_2.png) [@Mike\_L](https://community.dynatrace.com/u/Mike_L)\
**Post date:** [June 14, 2024, 9:21am UTC](https://community.dynatrace.com/t/extension-v1-to-v2-migration-endpoint-configuration/46108/3 "2024-06-14T09:21:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pahofmann](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pahofmann/32/17076_2.png) [@pahofmann](https://community.dynatrace.com/u/pahofmann)\
**Post date:** [June 14, 2024, 10:04am UTC](https://community.dynatrace.com/t/extension-v1-to-v2-migration-endpoint-configuration/46108/4 "2024-06-14T10:04:47Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Mike\_L](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mike_l/32/11717_2.png) [@Mike\_L](https://community.dynatrace.com/u/Mike_L)\
**Post date:** [June 14, 2024, 10:14am UTC](https://community.dynatrace.com/t/extension-v1-to-v2-migration-endpoint-configuration/46108/5 "2024-06-14T10:14:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pahofmann](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pahofmann/32/17076_2.png) [@pahofmann](https://community.dynatrace.com/u/pahofmann)\
**Post date:** [June 14, 2024, 11:27am UTC](https://community.dynatrace.com/t/extension-v1-to-v2-migration-endpoint-configuration/46108/6 "2024-06-14T11:27:42Z")

</div>

Thinking about it I got one more question. You wrote _Each&nbsp;Endpoint runs in its own thread so it’s not subsequent._

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

---

<div class="post-metadata">

**Author:** ![Mike\_L](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mike_l/32/11717_2.png) [@Mike\_L](https://community.dynatrace.com/u/Mike_L)\
**Post date:** [June 14, 2024, 12:00pm UTC](https://community.dynatrace.com/t/extension-v1-to-v2-migration-endpoint-configuration/46108/7 "2024-06-14T12:00:25Z")

</div>

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.
