The countdown to Elevate 2026 is on. Join us in Chicago, London, or Sydney.

Register here

Partners

Docs

LM Academy

LM Community

Platform

Solutions

Pricing

Resources

Company

Platform
  • Infrastructure
  • Cloud & Multi-Cloud
  • Log Management
  • Edwin AI
Solution
  • Automation
  • Tool Consolidation
  • Reduce MTTR
  • Cost Optimization
Industry
  • Healthcare
  • Financial Services
  • Public Sector
  • MSP
Role
  • CIO
  • ITOps
  • CloudOps
  • AIOps
There is no result.
Try it free

14-day access to the full LogicMonitor platform

Explore Platform

One platform, one system for observability, intelligence, and action.

Agentic AIOps

Infrastructure Observability

Cloud Observability

Internet Performance Monitoring

Digital Experience Monitoring

Log Management

3,000+ Integrations

Agentic AIOps Overview

Autonomously detect, diagnose, and resolve issues across your environment.

Meet Edwin AI

Turn fragmented cross-domain event noise into explainable, guided action.

AI Agent

Deploy specialized AI agents to handle investigation across the incident lifecycle.

Event Intelligence

Compress raw alert storms into high-fidelity, prioritized insights.

AI Automation

Execute governed, closed-loop remediation across automation playbooks.

ITOps Context Graph

NEW

Unify topology, telemetry, and changes into an AI-ready context layer.

MCP

NEW

Establish traceable, secure governance boundaries for AI tool integrations.

Infrastructure Observability Overview

Full visibility across your entire hybrid estate to eliminate tool sprawl.

Network Monitoring

Accelerate time to innocence with deep network path and device visibility.

Server Monitoring

Track server health, OS metrics, and resource utilization across environments.

Remote Monitoring

Monitor distributed endpoints, branch networks, and remote facility health.

VM Monitoring

Maximize hypervisor performance and streamline compute capacity planning.

SD-WAN Monitoring

Keep multi-site cloud networks connected with real-time edge visibility.

Database Monitoring

Pinpoint database query bottlenecks to keep business applications fast.

Configuration Monitoring

Minimize change failure rates by tracking device configuration drift.

Storage Monitoring

Track SAN/NAS arrays, IOPS bottlenecks, and storage capacity trends.

Cloud Observability Overview

Multi-cloud and hybrid environments unified into a single operational pane.

Container Monitoring

Automated, real-time visibility for Kubernetes and ephemeral microservices.

AWS Monitoring

Track AWS services, scaling, and costs alongside on-premises data.

Google Cloud Monitoring

Monitor native GCP infrastructure, compute, and serverless resources.

Azure Monitoring

Comprehensive visibility into Azure environments, gateways, and workloads.

AI Monitoring

Track LLM infrastructure, GPU utilization, and AI application stack health.

Oracle Cloud Monitoring

Track OCI native compute, enterprise databases, and cloud storage.

SaaS Monitoring

Validate availability and workforce productivity for critical SaaS apps.

Cloud Cost Optimization

Optimize cloud spend, maintain performance, and control budgets.

Internet Performance Monitoring Overview

Understand performance across the full stack wherever users depend on it.

Internet Health

NEW

Use global vantage points to independently validate internet outages.

Real User Monitoring

NEW

Capture actual customer journeys and frontend performance in real time.

Synthetic Monitoring

NEW

Emulate user transactions and SaaS workflows to catch problems early.

Endpoint Monitoring

NEW

Diagnose remote workforce digital experience across devices and networks.

Digital Experience Monitoring

See every dependency, regardless of ownership or location.

Website Monitoring

Protect revenue journeys with proactive synthetic checks and uptime tracking.

CDN Monitoring

NEW

Audit edge performance and latency variance across your CDN providers.

API Monitoring

NEW

Test endpoints and third-party API reliability for critical app integrations.

Application Performance Monitoring

Connect code execution and traces directly to infrastructure health.

DNS Monitoring

NEW

Speed up time-to-innocence by tracking global nameserver resolution times.

DevOps Lifecycle Monitoring

NEW

Protect release velocity by validating dependencies during deployments.

BGP Monitoring

NEW

Trace global routing changes and path leaks to secure internet reachability.

Log Management Overview

Centralize and correlate log data to resolve incidents before they escalate.

Log Analytics & Intelligence

Correlate contextual log data with metrics to speed up root-cause analysis.

WebPageTest Web Performance

Test, compare, and optimize website speed, Core Web Vitals, and performance across real devices and global locations.

Learn more
Explore Solutions

Proactively manage modern hybrid environments with predictive insights, intelligent automation, and full-stack observability.

By Business Outcome

By Role

By Industry

Professional Services

Autonomous IT

Predictive, autonomous IT built

for resilience.

Automation

Eliminate operational toil with safe, policy-governed remediation workflows.

Modernization and Transformation

Accelerate complex technology transitions while protecting core enterprise resilience.

Cloud Migration

Maintain workload performance throughout migration.

Tool Consolidation

Reduce licensing costs and silos by replacing fragmented monitoring tools.

Cost Optimization

Lower your total cost-to-serve by finding cloud waste and underused resources.

Operational Efficiency

Maximize team capacity by reducing alert storms and shift-handoff friction.

Reduce MTTR

Shorten war-rooms by surfacing topology-aware probable cause in mins.

Network Reachability

NEW

Independently audit external BGP, ISP, and SaaS provider connectivity boundaries.

Edge Deployment Optimization

NEW

Monitor SLOs, compare providers, and validate cloud and edge delivery.

Web Performance Optimization

NEW

Maximize digital checkout conversions by tracking global frontend latency metrics.

Application Resilience

NEW

Safeguard business services against transaction failures and costly downtime.

Workforce Productivity

NEW

Troubleshoot remote hardware and network issues to protect productivity.

CIO

Maximize enterprise resilience and align AI investments to measurable business ROI.

AIOps

Compress cross-domain event noise into explainable, automated ops leverage.

DevOps

Speed up releases by protecting engineering roadmaps from toil.

ITOps

Standardize incident response to reduce alert fatigue and after-hours work.

CloudOps

Unify multi-cloud visibility to optimize costs and track hybrid blast radius.

Healthcare

Protect continuity of care and EHR availability across clinical workflows.

Public Sector

Ensure mission continuity and audit readiness for citizen-facing services.

MSP

Protect service margins and scale ops using multi-tenant, AI-assisted triage.

Retail & E-commerce

Safeguard peak retail campaigns, POS uptime, and digital customer journeys.

Technology

Protect customer trust and engineering velocity with SLA-driven visibility.

Hospitality

Deliver frictionless guest experiences and keep booking engines online.

Education

Maintain always-on student portals, learning platforms, and campus networks.

Manufacturing

Prevent production downtime by unifying IT, OT-adjacent, and edge systems.

Financial Services

Secure transaction trust and meet strict resilience compliance requirements.

Why LogicMonitor?

Discover why leading IT teams trust us to unify hybrid observability and eliminate tool sprawl.

Learn more
Explore Resources

Check out our resource library for IT pros, featuring expert guides, strategies, and insights for smarter, AI-driven operations.

Resources

Upcoming Events

Platform Help

Blog

Insights and advice from the experts on all things observability and AI.

Case Studies

See what real users have to say about the LogicMonitor platform.

Webinars

Live and on-demand learning, all in one place.

IT Guides

Learn from expert guides on the topics that matter most to IT teams.

How We Compare

See how our platform stacks up against other solutions.

CONFERENCE

SWORD Day

September 17, 2026

Geneva

WEBINAR

Incident Management Has Outgrown Its Playbook

September 23, 2026

Online

View all events

Join us at innovation-focused conferences, tech talks, webinars, and other events.

Support Docs

Access product docs, release notes, and support resources.

LM Community

Join the community to learn from peers, ask questions, and connect with experts.

Customer Education

Learn more about our platform through resources and live trainings.

2026 The Year of Autonomous IT

NEW

Discover the trends, benchmarks, and strategies driving the industry shift to Autonomous IT.

Read the report
About LogicMonitor

Our observability platform proactively delivers the insights and automation CIOs need to accelerate innovation.

Leadership

Meet the leaders building the future of observability and AI.

Our Customers

See the proof of how IT teams win with LogicMonitor.

Careers

Find job openings and learn about our employee benefits.

Newsroom

Stay current with our latest mentions, press releases, and events.

Culture

NEW

Join a collaborative, values-driven culture built on innovation and growth.

Security

Purpose-built security for the hybrid observability and AI era.

Contact & Locations

Connect with our experts to explore AI-powered observability solutions.

Sustainability

Our commitment to the environment and the people in it.

The countdown to Elevate 2026 is on. Join us in Chicago, London, or Sydney.

Register here
Try it free

Platform

Explore Platform

One platform, one system for observability, intelligence, and action.

Agentic AIOps

Infrastructure Observability

Cloud Observability

Internet Performance Monitoring

Digital Experience Monitoring

Log Management

3,000+ Integrations

WebPageTest Web Performance

Test, compare, and optimize website speed, Core Web Vitals, and performance across real devices and global locations.

Solutions

Explore Solutions

Proactively manage modern hybrid environments with predictive insights, intelligent automation, and full-stack observability.

By Business Outcome

By Role

By Industry

Professional Services

Why LogicMonitor?

Discover why leading IT teams trust us to unify hybrid observability and eliminate tool sprawl.

Pricing

Resources

Explore Resources

Check out our resource library for IT pros, featuring expert guides, strategies, and insights for smarter, AI-driven operations.

Resources

Upcoming Events

Platform Help

NEW

2026 The Year of Autonomous IT

Discover the trends, benchmarks, and strategies driving the industry shift to Autonomous IT.

Company

About LogicMonitor

Our observability platform proactively delivers the insights and automation CIOs need to accelerate innovation.

Leadership

Meet the leaders building the future of observability and AI.

Careers

Find job openings and learn about our employee benefits.

Culture

NEW

Join a collaborative, values-driven culture built on innovation and growth.

Contact & Locations

Connect with our experts to explore AI-powered observability solutions.

Our Customers

See the proof of how IT teams win with LogicMonitor.

Newsroom

Stay current with our latest mentions, press releases, and events.

Security

Purpose-built security for the hybrid observability and AI era.

Sustainability

Our commitment to the environment and the people in it.

Partners

Docs

LM Academy

LM Community

Agentic AIOps

Agentic AIOps Overview

Autonomously detect, diagnose, and resolve issues across your environment.

Meet Edwin AI

Turn fragmented cross-domain event noise into explainable, guided action.

AI Agent

Deploy specialized AI agents to handle investigation across the incident lifecycle.

Event Intelligence

Compress raw alert storms into high-fidelity, prioritized insights.

AI Automation

Execute governed, closed-loop remediation across automation playbooks.

ITOps Context Graph

NEW

Unify topology, telemetry, and changes into an AI-ready context layer.

MCP

NEW

Establish traceable, secure governance boundaries for AI tool integrations.

Infrastructure Observability

Infrastructure Observability Overview

Full visibility across your entire hybrid estate to eliminate tool sprawl.

Network Monitoring

Accelerate time to innocence with deep network path and device visibility.

Server Monitoring

Track server health, OS metrics, and resource utilization across environments.

Remote Monitoring

Monitor distributed endpoints, branch networks, and remote facility health.

VM Monitoring

Maximize hypervisor performance and streamline compute capacity planning.

SD-WAN Monitoring

Keep multi-site cloud networks connected with real-time edge visibility.

Database Monitoring

Pinpoint database query bottlenecks to keep business applications fast.

Configuration Monitoring

Minimize change failure rates by tracking device configuration drift.

Storage Monitoring

Track SAN/NAS arrays, IOPS bottlenecks, and storage capacity trends.

Cloud Observability

Cloud Observability Overview

Multi-cloud and hybrid environments unified into a single operational pane.

Container Monitoring

Automated, real-time visibility for Kubernetes and ephemeral microservices.

AWS Monitoring

Track AWS services, scaling, and costs alongside on-premises data.

Google Cloud Monitoring

Monitor native GCP infrastructure, compute, and serverless resources.

Azure Monitoring

Comprehensive visibility into Azure environments, gateways, and workloads.

AI Monitoring

Track LLM infrastructure, GPU utilization, and AI application stack health.

Oracle Cloud Monitoring

Track OCI native compute, enterprise databases, and cloud storage.

SaaS Monitoring

Validate availability and workforce productivity for critical SaaS apps.

Cloud Cost Optimization

Optimize cloud spend, maintain performance, and control budgets.

Internet Performance Monitoring

Internet Performance Monitoring Overview

Understand performance across the full stack wherever users depend on it.

Internet Health

NEW

Use global vantage points for independent validation of internet outages.

Real User Monitoring

NEW

Capture actual customer journeys and frontend performance in real time.

Synthetic Monitoring

NEW

Emulate user transactions and SaaS workflows to catch problems early.

Endpoint Monitoring

NEW

Diagnose remote workforce digital experience across devices and networks.

Digital Experience Monitoring

Digital Experience Monitoring

See every dependency, regardless of ownership or location.

Website Monitoring

Protect revenue journeys with proactive synthetic checks and uptime tracking.

CDN Monitoring

NEW

Audit edge performance and latency variance across your CDN providers.

API Monitoring

NEW

Test endpoints and third-party API reliability for critical app integrations.

Application Performance Monitoring

Connect code execution and traces directly to infrastructure health.

DNS Monitoring

NEW

Speed up time to innocence by tracking global nameserver resolution times.

DevOps Lifecycle Monitoring

NEW

Protect release velocity by validating dependencies during deployments.

BGP Monitoring

NEW

Trace global routing changes and path leaks to secure internet reachability.

Logs

Log Management Overview

Centralize and correlate log data to resolve incidents before they escalate.

Log Analytics & Intelligence

Correlate contextual log data with metrics to speed up root-cause analysis.

By Business Outcome

Autonomous IT

Predictive, autonomous IT built for resilience.

Automation

Eliminate repetitive operational toil with safe, policy-governed remediation workflows.

Modernization and Transformation

Accelerate complex technology transitions while protecting core enterprise resilience.

Cloud Migration

Maintain workload performance throughout migration.

Tool Consolidation

Reduce licensing costs and data silos by replacing fragmented monitoring tools.

Cost Optimization

Lower your total cost-to-serve by finding cloud waste and underused resources.

Operational Efficiency

Maximize team capacity by reducing alert storms and shift-handoff friction.

Reduce MTTR

Shorten war-room by surfacing topology-aware probable cause in mins.

Network Reachability

NEW

Independently audit external BGP, ISP, and SaaS provider connectivity boundaries.

Edge Deployment Optimization

NEW

Monitor SLOs, compare providers, and validate cloud and edge delivery.

Web Performance Optimization

NEW

Maximize digital checkout conversions by tracking global frontend latency metrics.

Application Resilience

NEW

Safeguard business services against transaction failures and costly downtime.

Workforce Productivity

NEW

Troubleshoot remote hardware and network issues to protect productivity.

By Role

CIO

Maximize enterprise resilience and align AI investments to measurable business ROI.

AIOps

Compress cross-domain event noise into explainable, automated ops leverage.

DevOps

Speed up releases by protecting engineering roadmaps from toil.

ITOps

Standardize incident response to reduce alert fatigue and after-hours work.

CloudOps

Unify multi-cloud visibility to optimize costs and track hybrid blast radius.

By Industry

Healthcare

Protect continuity of care and EHR availability across clinical workflows.

Public Sector

Ensure mission continuity and audit readiness for citizen-facing services.

MSP

Protect service margins and scale ops using multi-tenant, AI-assisted triage.

Retail & E-commerce

Safeguard peak retail campaigns, POS uptime, and digital customer journeys.

Technology

Protect customer trust and engineering velocity with SLA-driven visibility.

Hospitality

Deliver frictionless guest experiences and keep booking engines online.

Education

Maintain always-on student portals, learning platforms, and campus networks.

Manufacturing

Prevent production downtime by unifying IT, OT-adjacent, and edge systems.

Financial Services

Secure transaction trust and meet strict operational resilience compliance requirements.

Resources

Blog

Insights and advice from the experts on all things observability and AI.

Case Studies

See what real users have to say about the LogicMonitor platform.

Webinars

Live and on-demand learning, all in one place.

IT Guides

Learn from expert guides on the topics that matter most to IT teams.

How We Compare

See how our platform stacks up against other solutions.

Upcoming Events

CONFERENCE

SWORD Day

September 17, 2026

WEBINAR

Incident Management Has Outgrown Its Playbook

September 23, 2026

View all events

Join us at innovation-focused conferences, tech talks, webinars, and other events.

Platform Help

Support Docs

Access product docs, release notes, and support resources.

LM Community

Join the community to learn from peers, ask questions, and connect with experts.

Customer Education

Learn more about our platform through resources and live trainings.

LOGICMONITOR BLOG

DotNet Application Instrumentation for Distributed Traces

Use this guide to write a DotNet (.Net) application emitting traces using the OpenTelemetry Protocol (OTLP) Specification. All you need is .NET Framework 4.6.2+ or .NET Core 2.1+ and a basic understanding of developing applications on the .Net framework.

4–5 minutes
August 19, 2021

IN THIS ARTICLE

NEWSLETTER

Subscribe to our newsletter

Get the latest blogs, whitepapers, eGuides, and more straight into your inbox.

SHARE

Use this guide to write a DotNet (.Net) application emitting traces using the OpenTelemetry Protocol (OTLP) Specification. All you need is .NET Framework 4.6.2+ or .NET Core 2.1+ and a basic understanding of developing applications on the .Net framework.

Initialize New Project

First, we will create a new console application and add the following packages to enable OpenTelemetry. These can either be installed using an IDE or by a command line like below.


dotnet new console --output getting-started
// Add dotnet packagesdotnet add package Opentelemetrydotnet add package Opentelemetry.Exporter.OpentelemetryProtocol

Create Resource Detectors

A resource describes the object that generated the telemetry signals. Essentially, it must be the name of the service or application. OpenTelemetry has defined the standards to describe the service execution env, viz. hostname, hostType (cloud, container, serverless), namespace, cloud-resource-id, etc.

In this example, we are defining the resource with a few env var settings of the application.

 var resourceList = new List<KeyValuePair<string, object>>();
 resourceList.Add(newKeyValuePair<string,object>
("service.namespace","US-West-1"));
 resourceList.Add(new KeyValuePair<string, object>("host.name",
"prodsvc.us-west-1.example.com"));
 resourceList.Add(new KeyValuePair<string, object>("host.type",
"system"));

Construct TracerProvider 

The sdk/trace package contains support for OpenTelemetry distributed tracing. TracerProvider is the entry point of the OpenTelemetry API.

Here, CreateTracerProviderBuilder returns a new and configured TracerProvider.

 TracerProviderBuilder tracerProvider =
Sdk.CreateTracerProviderBuilder();

Configure Resource Builder 

The AddService method of ResourceBuilder can be used to add the following attributes to Resource:

  1. string serviceName
  2. string serviceNamespace
  3. string serviceVersion
  4. bool autoGeneratedServiceInstanceId → if false, the fifth parameter must be set
  5. string serviceInstanceId

The following document defines standard attributes for resources. Resource Builder Specification.

 string serviceName = "product-service";
 string instanceId = "product-service-instance-id";
 tracerProvider.AddAspNetCoreInstrumentation();
 tracerProvider.SetResourceBuilder(ResourceBuilder.CreateDefault()
      .AddService(serviceName, null, null, false,
$"{instanceId}").AddAttributes(resourceList));
 tracerProvider.SetSampler(new AlwaysOnSampler());
 tracerProvider.AddSource("TestActivitySource");

Init Trace Exporter

You can configure the OtlpExporter through OtlpExporterOptions properties:

  • Endpoint: Target to which the exporter is going to send traces or metrics. The endpoint must be a valid Uri with the scheme (HTTP or HTTPS) and host and may contain a port and path.
  • Headers: Optional headers for the connection.
  • TimeoutMilliseconds: Max waiting time for the backend to process a batch.
  • ExportProcessorType: Whether the exporter should use Batch or Simple exporting processor.
  • BatchExportProcessorOptions: Configuration options for the batch exporter. Only used if ExportProcessorType is set to Batch.

We need to set the OTLP_ENDPOINT environment variable in order to send traces to the collector using the OTLP exporter. 

var otlpEndpoint =Environment.GetEnvironmentVariable("OTLP_ENDPOINT")
??"https://localhost:55680";
 tracerProvider.AddOtlpExporter(opt => opt.Endpoint = 
new Uri(otlpEndpoint)).Build();

Create Tracer 

Using OpenTelemetry.API Shim is only recommended if you want to use OpenTelemetry terminology like Tracer and Span instead of ActivitySource and Activity.

In the following example, we are using OpenTelemetry.API Shim to generate spans.

       var tracer = TracerProvider.Default.GetTracer("TestActivitySource");

Create a Span and Define Span Attributes

A span is a single execution of an operation. It is identified by a set of attributes, which are sometimes referred to as span tags. Application owners are free to choose the attributes which can capture required information for the spans. There is no limit to the number of span attributes per span. 

In this example, we are defining two-span attributes for our sample applications.

using (var parentSpan = tracer.StartActiveSpan("parent span"))
       {
           parentSpan.SetAttribute("priority", "business.priority");
           parentSpan.SetAttribute("prodEnv", true);
           parentSpan.UpdateName("parent span new name");
  }

Add Events/Logs to Spans

Spans can be enriched with some execution logs/events that happened during the execution of the span. This information will help provide contextual logs always tied up with the respective span.

 var childSpan = tracer.StartSpan("child span");
 childSpan.AddEvent("Authentication").SetAttribute("Username",
"value").SetAttribute("Id", 101);
 childSpan.SetStatus(OpenTelemetry.Trace.Status.Ok);
 childSpan.End();

Putting It Together

using System;
using System.Collections.Generic;
using OpenTelemetry;
using OpenTelemetry.Resources;
using OpenTelemetry.Trace;
 
public class Program
{
   public static void Main()
   {
       // Only Required when using insecure (http) endpoint
AppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.
   Http2UnencryptedSupport", true);
 
      var resourceList = new List<KeyValuePair<string, object>>();
      resourceList.Add(new KeyValuePair<string, object>("service.namespace",
         "US-West-1"));
      resourceList.Add(new KeyValuePair<string, object>("host.name",
   "prodsvc.us-west-1.example.com"));
      resourceList.Add(new KeyValuePair<string, object>("host.type",
   "system"));
 
      TracerProviderBuilder tracerProvider =Sdk.CreateTracerProviderBuilder(); 
 
      string serviceName = "product-service";
      string instanceId = "product-service-instance-id";
      tracerProvider.AddAspNetCoreInstrumentation();
      tracerProvider.SetResourceBuilder(ResourceBuilder.CreateDefault()
      .AddService(serviceName, null, null, false,
 	$"{instanceId}").AddAttributes(resourceList));
      tracerProvider.SetSampler(new AlwaysOnSampler());
      tracerProvider.AddSource("TestActivitySource");
 
      var otlpEndpoint = Environment.GetEnvironmentVariable("OTLP_ENDPOINT")
 	?? "https://localhost:55680";
      tracerProvider.AddOtlpExporter(opt => opt.Endpoint = new
 	Uri(otlpEndpoint)).Build();
      var tracer = TracerProvider.Default.GetTracer("TestActivitySource");
 
      using (var parentSpan = tracer.StartActiveSpan("parent span"))
      {
           parentSpan.SetAttribute("priority", "business.priority");
           parentSpan.SetAttribute("prodEnv", true);
           parentSpan.UpdateName("parent span new name");
 
           var childSpan = tracer.StartSpan("child span");
           childSpan.AddEvent("Authentication").SetAttribute("Username",
 	   "value").SetAttribute("Id", 101);
           childSpan.SetStatus(OpenTelemetry.Trace.Status.Ok);
           childSpan.End();
       }
   }
}

Run The Application 

Finally, we run this instrumented application to get traces in the LogicMonitor platform.

dotnet run
Traces shown in the LogicMonitor platform
Service Name and Resource Attributes highlighted within the LogicMonitor platform

Constructed Trace

Resource labels:
     -> service.namespace: STRING(US-West-1)
     -> host.name: STRING(prodsvc.us-west-1.example.com)
     -> host.type: STRING(system)
     -> service.name: STRING(product-service)
     -> service.instance.id: STRING(product-service-instance-id)
InstrumentationLibrarySpans #0
InstrumentationLibrary TestActivitySource 
Span #0
    Trace ID       : 7b7d18466ee42b45b797a30fbc55f09e
    Parent ID      : 204b306e1ba7124d
    ID             : 8fd6f7414b2a4a4a
    Name           : child span
    Kind           : SPAN_KIND_INTERNAL
    Start time     : 2021-07-26 18:33:25.300514 +0530 IST
    End time       : 2021-07-26 18:33:25.302944 +0530 IST
    Status code    : STATUS_CODE_OK
    Status message : 
Attributes:
     -> UserName: STRING(value)
     -> Id: INT(101)
Events:
SpanEvent #0
     -> Name: sample event
     -> Timestamp: 1627304605301466000
     -> DroppedAttributesCount: 0
Span #1
    Trace ID       : 7b7d18466ee42b45b797a30fbc55f09e
    Parent ID      : 
    ID             : 204b306e1ba7124d
    Name           : parent span new name
    Kind           : SPAN_KIND_INTERNAL
    Start time     : 2021-07-26 18:33:25.29771 +0530 IST
    End time       : 2021-07-26 18:33:25.334138 +0530 IST
    Status code    : STATUS_CODE_UNSET
    Status message : 
Attributes:
     -> priority: STRING(business.priority)
     -> prodEnv: BOOL(true)

Conclusion

Congratulations, you have just written a .Net application emitting traces using the OpenTelemetry Protocol (OTLP) Specification. Feel free to use this code as a reference when you get started with instrumenting your business application with OTLP specifications. LogicMonitor APM specification is 100% OTLP compliant with no vendor lock-in. To receive and visualize traces of multiple services for troubleshooting with the LogicMonitor platform, sign up for a free trial account here. Check back for more blogs covering application instrumentation steps for distributed tracing with OpenTelemetry standards across multiple languages.

© LogicMonitor 2026 | All rights reserved. | All trademarks, trade names, service marks, and logos referenced herein belong to their respective companies.

Related Blogs

AI Incident Response Automation: Deciding What Agents Can Do
Blog AIOps & Automation

AI Incident Response Automation: Deciding What Agents Can Do

Which incident tasks should AI agents handle? Evaluate reversibility, blast radius, and human approval before giving agents more autonomy.
September 8, 2026
Learn more
Apache Monitoring: Setup, Key Metrics, and Troubleshooting
Blog

Apache Monitoring: Setup, Key Metrics, and Troubleshooting

Apache monitoring helps you track server availability, request volume, response times, worker capacity, HTTP errors, and host-resource usage. Learn how to set up mod_status, secure the /server-status endpoint, interpret key metrics, troubleshoot performance issues, and connect Apache data to broader infrastructure monitoring.
September 4, 2026
Learn more
Edwin AI and the New Requirements for Operational Resilience in ITOps
Blog AIOps & Automation

Edwin AI and the New Requirements for Operational Resilience in ITOps

Operational resilience depends on more than detecting incidents. Learn how Edwin AI helps ITOps teams connect signals, isolate root cause, predict risk, and respond faster across hybrid environments.
September 4, 2026
Learn more

Product

Platform

Infrastructure

Cloud & Multi-Cloud

Log Management

Edwin AI

Enterprise

Demo

Pricing

WebPageTest Pricing

RUM Monitoring

IPM Monitoring

Synthetic Monitoring

How We Compare

Datadog

Dynatrace

Virtana

Solarwinds

PRTG

ManageEngine

ScienceLogic

SiteScope

BigPanda

About

Careers

Our Partners

Leadership

Newsroom

Security

AI Governance

Sustainability

Legal

Documentation

Docs Hub

Release Notes

Security

Support Center

Resources

Autonomous IT in 2026

Resource Library

LM Academy

Blog

Case Studies

Customer Education

Connect

Contact & Locations

Submit a Ticket

Events

LM Community

Careers


Product

Platform

Infrastructure

Cloud & Multi-Cloud

Log Management

Edwin AI

Enterprise

Demo

Pricing

WebPageTest Pricing

RUM Monitoring

IPM Monitoring

Synthetic Monitoring


How We Compare

Datadog

Dynatrace

Virtana

Zenoss

Solarwinds

PRTG

ManageEngine

ScienceLogic

SiteScope

BigPanda


About

Careers

Our Partners

Leadership

Newsroom

Security

AI Governance

Sustainability

Legal


Documentation

Docs Hub

Release Notes

Security

Support Center


Resources

Autonomous IT in 2026

Resource Library

LM Academy

Blog

Case Studies

Customer Education


Connect

Contact & Locations

Submit a Ticket

Events

LM Community

Careers


Privacy Policy

Terms of Use

Preference Center

Do Not Sell My Information

© 2026 LogicMonitor