# Getting started with custom deployment events

**URL:** <https://community.dynatrace.com/t/getting-started-with-custom-deployment-events/54423>\
**Category:** Alerting\
**Tags:** problem-detection, tagging, entity-selector, dynatrace-api\
**Created:** [December 17, 2025, 1:51pm UTC](https://community.dynatrace.com/t/getting-started-with-custom-deployment-events/54423 "2025-12-17T13:51:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![eric\_h](https://avatars.discourse-cdn.com/v4/letter/e/f17d59/32.png) [@eric\_h](https://community.dynatrace.com/u/eric_h)\
**Post date:** [December 17, 2025, 1:51pm UTC](https://community.dynatrace.com/t/getting-started-with-custom-deployment-events/54423/1 "2025-12-17T13:51:53Z")

</div>

I would like to start using the Events API (v2) to post CUSTOM\_DEPLOYMENT events to Dynatrace, from our CI/CD pipelines. The ultimate goal is to add this information to Dynatrace so it’s useful to Davis and users to correlate deployments with issues that occur.

I am having difficulty with a couple of things, though.

1) How do I use the entitySelector? I see various examples, e.g.&nbsp;[Events API v2 - POST an event — Dynatrace Docs](https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-api/environment-api/events-v2/post-event#examples--example-1), but I cannot find a good explanation of how to use it. In our case, our apps mostly run on Azure VM Scale Sets. So maybe I could use this to associate the Scale Set (I do know the scale set name during the deployment). If so, what would be the syntax for the entitySelector be?

2) Is there any other good way to associate the deployment with other things in Dynatrace? For instance, we tag a lot of objects in Dynatrace. Could I somehow “tag” this custom event as well? If so, how exactly would I do so?

---

<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:** [December 17, 2025, 2:55pm UTC](https://community.dynatrace.com/t/getting-started-with-custom-deployment-events/54423/2 "2025-12-17T14:55:16Z")

</div>

[@eric\_h](https://community.dynatrace.com/user/98957)&nbsp;there can be many entities in Dynatrace, with entitySelector you can select entities of one type and not just for tagging.

Typically, you want to send deployment events to process groups, but it’s not limited to a particular entity. For sending events, please rember a single entitySelector can select just entities of a single type. You need to call the postEvent API endpoint multiple types with different entitySelector for sending events to different types.

See an example [here](https://docs.dynatrace.com/docs/shortlink/version-detection#events-ingestion)&nbsp;also have a look at the following [video](https://www.youtube.com/watch?v=mYWg4vTR9zc)&nbsp;-&nbsp;Unleash the power of Events APIv2 – Integrate your DevOps Tools.

---

<div class="post-metadata">

**Author:** ![eric\_h](https://avatars.discourse-cdn.com/v4/letter/e/f17d59/32.png) [@eric\_h](https://community.dynatrace.com/u/eric_h)\
**Post date:** [December 23, 2025, 6:21pm UTC](https://community.dynatrace.com/t/getting-started-with-custom-deployment-events/54423/3 "2025-12-23T18:21:46Z")

</div>

Thank you for the help! The video in particular was great.
