# 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:** 1\
**Showing post:** 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

---

_[View the full topic](https://community.dynatrace.com/t/custom-activegate-plugin-how-to-properly-send-events-back-to-dynatrace/21506)._
