# Sql span in .net framework application desktop

**URL:** <https://discuss.elastic.co/t/sql-span-in-net-framework-application-desktop/359327>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-monitoring\
**Created:** [May 12, 2024, 7:42pm UTC](https://discuss.elastic.co/t/sql-span-in-net-framework-application-desktop/359327 "2024-05-12T19:42:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kirtash](https://avatars.discourse-cdn.com/v4/letter/k/a8b319/32.png) [@Kirtash](https://discuss.elastic.co/u/Kirtash)\
**Post date:** [May 12, 2024, 7:42pm UTC](https://discuss.elastic.co/t/sql-span-in-net-framework-application-desktop/359327/1 "2024-05-12T19:42:28Z")

</div>

Good morning,

I have a desktop application in .net framework 4.8 and now I could create manual transactions with this configuration:

```auto
Agent.Subscribe(New HttpDiagnosticsSubscriber())
Agent.Setup(New AgentComponents())

```

Package: elastic.Apm

But I would like see the sqlspans. I have review that I use sql queries inside a created transaction but not appears. I have read that I must add this line:

```auto
- Agent.Subscribe(New SqlClientDiagnosticSubscriber())

```

I have add it after the Setup but now I have an error about:

```auto
System.MethodAccessException: 'Error cuando el método 'Elastic.Apm.SqlClient.SqlClientDiagnosticSubscriber.Subscribe(Elastic.Apm.IApmAgent)' intentó obtener acceso al método 'Elastic.Apm.CompositeDisposable..ctor()'.'

```

Any help would be greatly appreciated.

Thanks!!
