# Custom ActiveGate plugin - how to properly send events back to Dynatrace?

**URL:** <https://community.dynatrace.com/t/custom-activegate-plugin-how-to-properly-send-events-back-to-dynatrace/21506>\
**Category:** Extensions\
**Tags:** activegate, extensions\
**Created:** [February 15, 2021, 1:36pm UTC](https://community.dynatrace.com/t/custom-activegate-plugin-how-to-properly-send-events-back-to-dynatrace/21506 "2021-02-15T13:36:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jan\_VanBelle](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jan_vanbelle/32/34174_2.png) [@Jan\_VanBelle](https://community.dynatrace.com/u/Jan_VanBelle)\
**Post date:** [February 15, 2021, 1:36pm UTC](https://community.dynatrace.com/t/custom-activegate-plugin-how-to-properly-send-events-back-to-dynatrace/21506/1 "2021-02-15T13:36:59Z")

</div>

Hello all,

When scrolling through the [API-documentation](https://dynatrace.github.io/plugin-sdk/api/remote_python_apidoc.html) before writing a new python plugin, I noticed 2 different ways to report events back to Dynatrace:

_ **The old way** _

```auto
grp = self.topology_builder.create_group(grp_id, grp_name)
dev = grp.create_device(dev_id, dev_name)
dev.report_error_event(title, desc, props)

```

_ **The new way** _

```auto
xxx.event_error(title, desc, props)

```

Via the chat I got the message:

_Result of both operations are basically the same - the only difference is that report\_performance\_event is called with results\_builder context (the older method of reporting data, still supported), while event\_performance is method called with entity context (newer approach)_

I hoped it’d be a simple replace-thing, but when replacing dev.report\_error\_event with dev.event\_error I get the message

```auto
AttributeError: 'Device' object has no attribute 'event_error'

```

Can someone help me out with this?

It’s the ‘new approach’ but it’s not mentioned in documentation or sample applications.

The reason why I’d like to find out is because we’re having troubles with problems being closed every 30minutes.

So I’d like to find out if we have the same problem with the new way of reporting problems also?

Kind regards,

Jan

---

<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:** [February 22, 2021, 4:09pm UTC](https://community.dynatrace.com/t/custom-activegate-plugin-how-to-properly-send-events-back-to-dynatrace/21506/2 "2021-02-22T16:09:26Z")

</div>

Hi Jan, I currently don’t have the time to run any tests (I use report\_error\_event by the way). But it will not change the problem timeout. Make sure that you resend the same error before the timeout happens and the problem should stay open. If not please raise a support ticket.

Mike

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [June 30, 2021, 3:21pm UTC](https://community.dynatrace.com/t/custom-activegate-plugin-how-to-properly-send-events-back-to-dynatrace/21506/3 "2021-06-30T15:21:48Z")

</div>

Btw since 1.205 there are bugs with deduplication of events (should be resolved with 217, but my experience says it is not). I’d recommend using Events API instead.

---

<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 30, 2021, 3:23pm UTC](https://community.dynatrace.com/t/custom-activegate-plugin-how-to-properly-send-events-back-to-dynatrace/21506/4 "2021-06-30T15:23:57Z")

</div>

Our tests of version 217 shows that’s it’s resolved and keeps a single problem open for the duration of us sending the same title+description at least once every 15 minutes.

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [July 1, 2021, 11:25am UTC](https://community.dynatrace.com/t/custom-activegate-plugin-how-to-properly-send-events-back-to-dynatrace/21506/5 "2021-07-01T11:25:00Z")

</div>

Hi Mike,

just tried again with ActiveGate 1.217. No, it still does not work and I don’t want to open a third support ticket for the same issue 🙂 I will stick with the Events API.

Julius

---

<div class="post-metadata">

**Author:** ![Vanguard](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/vanguard/32/29977_2.png) [@Vanguard](https://community.dynatrace.com/u/Vanguard)\
**Post date:** [October 28, 2022, 3:20pm UTC](https://community.dynatrace.com/t/custom-activegate-plugin-how-to-properly-send-events-back-to-dynatrace/21506/6 "2022-10-28T15:20:27Z")

</div>

I would already be pleased if I could find the actual SDK Dokumentation Online, the link [https://dynatrace.github.io/plugin-sdk/api/remote\_python\_apidoc.html](https://dynatrace.github.io/plugin-sdk/api/remote_python_apidoc.html) is dead.

---

<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:** [October 28, 2022, 3:25pm UTC](https://community.dynatrace.com/t/custom-activegate-plugin-how-to-properly-send-events-back-to-dynatrace/21506/7 "2022-10-28T15:25:15Z")

</div>

This is probably the best one instead of the link you posted:&nbsp;[Develop your own Extensions — Dynatrace Docs](https://www.dynatrace.com/support/help/extend-dynatrace/extensions/development/extension-how-tos/topology)
