# Logs: dotnet logger category------ where?

**URL:** <https://discuss.elastic.co/t/logs-dotnet-logger-category-where/363304>\
**Category:** Elastic Observability\
**Created:** [July 17, 2024, 10:11pm UTC](https://discuss.elastic.co/t/logs-dotnet-logger-category-where/363304 "2024-07-17T22:11:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![amccool](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amccool/32/29247_2.png) [@amccool](https://discuss.elastic.co/u/amccool)\
**Post date:** [July 17, 2024, 10:11pm UTC](https://discuss.elastic.co/t/logs-dotnet-logger-category-where/363304/1 "2024-07-17T22:11:54Z")

</div>

Using Otel Collector 0.103 with dotnet core 8x I can see the log records in my Elastic 8 setup (sending logs to the APM server). However, I'm missing a critical attribute:  
the dotnet ILogger category name

e.g.

`ILogger<aspnetcoreLogging.Boooo>`

I see the data in the Otel collector debug/detailed output

InstrumentationScope aspnetcoreLogging.Boooo

```auto
2024-07-17T17:05:48.029-0500 info ResourceLog #0
Resource SchemaURL:
Resource attributes:
     -> service.name: Str(alex-goes-to-hollywood)
     -> service.instance.id: Str(b1633a2a-4151-4e94-9a40-5eaa30327961)
     -> telemetry.sdk.name: Str(opentelemetry)
     -> telemetry.sdk.language: Str(dotnet)
     -> telemetry.sdk.version: Str(1.9.0)
ScopeLogs #0
ScopeLogs SchemaURL:
***InstrumentationScope aspnetcoreLogging.Boooo***
LogRecord #0
ObservedTimestamp: 2024-07-17 22:05:47.7724086 +0000 UTC
Timestamp: 2024-07-17 22:05:47.7724086 +0000 UTC
SeverityText: Information
SeverityNumber: Info(9)
Body: Str(xxxxxxxxxxxxxxxx)
Trace ID: 4aaa98e82b6317a9ed82bbf2fde75571
Span ID: 8b91441226859acc
Flags: 1
        {"kind": "exporter", "data_type": "logs", "name": "debug"}

```

but this attribute is not available in the Discover or APM log explorer pages.

How can I get this attribute to be present for searching and filtering?

thanks,  
BozoJoe

---

<div class="post-metadata">

**Author:** ![amccool](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amccool/32/29247_2.png) [@amccool](https://discuss.elastic.co/u/amccool)\
**Post date:** [July 18, 2024, 4:52pm UTC](https://discuss.elastic.co/t/logs-dotnet-logger-category-where/363304/2 "2024-07-18T16:52:44Z")

</div>

here's the output data

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/1/21fcdaccf261685e76b904fc7f38dbd4b942d721.png)

---

<div class="post-metadata">

**Author:** ![amccool](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amccool/32/29247_2.png) [@amccool](https://discuss.elastic.co/u/amccool)\
**Post date:** [July 18, 2024, 4:55pm UTC](https://discuss.elastic.co/t/logs-dotnet-logger-category-where/363304/3 "2024-07-18T16:55:14Z")

</div>

the setup is:

```auto
builder.Services.AddOpenTelemetry()
    .ConfigureResource(resource => resource
        .AddService(serviceName: "alex-goes-to-hollywood"))
    .WithTracing(tracing => tracing
        .AddAspNetCoreInstrumentation()
        .AddOtlpExporter())
    .WithMetrics(metrics =>
        metrics.AddAspNetCoreInstrumentation()
        .AddOtlpExporter())
    .WithLogging(logger =>
        logger.AddOtlpExporter());

```

```auto
app.MapGet("/weatherforecast", (ILogger<aspnetcoreLogging.Boooo> logger) =>
{
    logger.LogInformation("xxxxxxxxxxxxxxxx");

```

```auto
  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.6" />
    <PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.9.0" />
    <PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.9.0" />
    <PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.9.0" />
    <PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.9.0" />
    <PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.9.0" />
    <PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
  </ItemGroup>

```

---

<div class="post-metadata">

**Author:** ![Martijn\_Laarman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/martijn_laarman/32/4410_2.png) [@Martijn\_Laarman](https://discuss.elastic.co/u/Martijn_Laarman)\
**Post date:** [July 19, 2024, 3:21pm UTC](https://discuss.elastic.co/t/logs-dotnet-logger-category-where/363304/4 "2024-07-19T15:21:13Z")

</div>

Thanks for bringing this to our attention @amcool we currently only map instrumentation scope for traces.

I opened an issue to map it for metrics and logs too: [Support Instrumentation Scope on all signals · Issue #325 · elastic/apm-data · GitHub](https://github.com/elastic/apm-data/issues/325)

Will tackle this next week.

---

<div class="post-metadata">

**Author:** ![amccool](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amccool/32/29247_2.png) [@amccool](https://discuss.elastic.co/u/amccool)\
**Post date:** [August 28, 2024, 2:41pm UTC](https://discuss.elastic.co/t/logs-dotnet-logger-category-where/363304/5 "2024-08-28T14:41:33Z")

</div>

I heard thru the grapevine that apm 8.16 should contain this fix
