# Adding custom dimensions in logs

**URL:** <https://community.dynatrace.com/t/adding-custom-dimensions-in-logs/42296>\
**Category:** Logs\
**Tags:** logs\
**Created:** [October 26, 2023, 9:21am UTC](https://community.dynatrace.com/t/adding-custom-dimensions-in-logs/42296 "2023-10-26T09:21:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [October 26, 2023, 9:21am UTC](https://community.dynatrace.com/t/adding-custom-dimensions-in-logs/42296/1 "2023-10-26T09:21:11Z")

</div>

Hello,

I see below predefined dimensions, is there any way to extract a custom dimension from the log lines?

KR Henk

 ![henk_stobbe_0-1698311960952.png](https://global.discourse-cdn.com/dynatrace/original/2X/d/d3db3fc0469177658e788102d3095f747ff4a904.png)

---

<div class="post-metadata">

**Author:** ![radek\_jasinski](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radek_jasinski/32/10432_2.png) [@radek\_jasinski](https://community.dynatrace.com/u/radek_jasinski)\
**Post date:** [October 26, 2023, 10:04am UTC](https://community.dynatrace.com/t/adding-custom-dimensions-in-logs/42296/2 "2023-10-26T10:04:25Z")

</div>

Hi&nbsp;[@henk\_stobbe](https://community.dynatrace.com/user/11427)

After verifying the documentation, I do not see this option.

> **[Log Monitoring API v2 - POST ingest logs](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/log-monitoring-v2/post-ingest-logs)**
>
> Push custom logs to Dynatrace via the Log Monitoring API v2.

Radek

---

<div class="post-metadata">

**Author:** ![Mohamed\_Hamdy](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@Mohamed\_Hamdy](https://community.dynatrace.com/u/Mohamed_Hamdy)\
**Post date:** [October 26, 2023, 12:02pm UTC](https://community.dynatrace.com/t/adding-custom-dimensions-in-logs/42296/3 "2023-10-26T12:02:18Z")

</div>

Hi&nbsp;[@henk\_stobbe](https://community.dynatrace.com/user/11427)&nbsp;,

I think you need to create a log custom attributes first then you can use them to filter the logs and as dimensions when creating metrics.

for more details please check the following for the classic log monitoring

> **[Log custom attributes](https://docs.dynatrace.com/docs/analyze-explore-automate/log-monitoring/analyze-log-data/log-custom-attributes-classic)**
>
> Create and use custom attributes during log data ingestion.

for me, I’ve created multiple to capture some custom attributes from JSON log event but it’s not reflected as mentioned on the documentation, so I’ve opened a support ticket, and still in progress but you can try to create that as well.

---

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [October 26, 2023, 12:14pm UTC](https://community.dynatrace.com/t/adding-custom-dimensions-in-logs/42296/4 "2023-10-26T12:14:04Z")

</div>

Hi Mohamed,

Thanks for your aswer/addon, I see in the link it is for logging V1, I am afraid in logging V2 (Grail) this option is not even available )-;

KR Henk

---

<div class="post-metadata">

**Author:** ![Mohamed\_Hamdy](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@Mohamed\_Hamdy](https://community.dynatrace.com/u/Mohamed_Hamdy)\
**Post date:** [October 27, 2023, 6:11am UTC](https://community.dynatrace.com/t/adding-custom-dimensions-in-logs/42296/5 "2023-10-27T06:11:16Z")

</div>

Hi&nbsp;[@henk\_stobbe](https://community.dynatrace.com/user/11427)&nbsp;,

I can see that there is an update for Grail as well, if it’s not reflected yet, I think you can check with the Dynatrace support team

> **[Log custom attributes](https://docs.dynatrace.com/docs/analyze-explore-automate/logs/lma-analysis/logs-and-events/lma-log-custom-attributes)**
>
> Create and use custom attributes during log data ingestion.

---

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [October 27, 2023, 6:55am UTC](https://community.dynatrace.com/t/adding-custom-dimensions-in-logs/42296/6 "2023-10-27T06:55:14Z")

</div>

Hi Mohammde,

Almost thought it was the same link (-;, until I noticed:

![henk_stobbe_0-1698389618067.png](https://global.discourse-cdn.com/dynatrace/original/2X/2/2887ede8df2eb9927be5330610c145658078f5e0.png)

I will study it (-;

Thanks!

Henk

---

<div class="post-metadata">

**Author:** ![mizso74](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mizso74/32/41729_2.png) [@mizso74](https://community.dynatrace.com/u/mizso74)\
**Post date:** [October 31, 2023, 12:25pm UTC](https://community.dynatrace.com/t/adding-custom-dimensions-in-logs/42296/7 "2023-10-31T12:25:03Z")

</div>

Hi&nbsp;[@henk\_stobbe](https://community.dynatrace.com/user/11427)

Could you please check my post for the extra dimensions.

[Solved: List log files for a metric - Dynatrace Community](https://community.dynatrace.com/post/205804)

I hope it helps.

Best regards,

Mizső

---

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [October 31, 2023, 2:30pm UTC](https://community.dynatrace.com/t/adding-custom-dimensions-in-logs/42296/8 "2023-10-31T14:30:24Z")

</div>

Hu&nbsp;Mizső,

Thanks for that,

KR Henk
