.NET Agent version 1.xedit

1.26.0 - 2024/02/20edit

This release introduces more thorough sanitization of request/response cookies to align with the APM spec. The incoming Cookie is now redacted by default. The cookies it contains are extracted and sanitized according to the SanitizeFieldNames configuration. Response headers are now correctly sanitized, including the Set-Cookie header. This is a behaviour change!

Featuresedit

#2290 Fully implement the sanitization spec for request/response headers #2272 Include process information in metadata stanza when emitting events to apm-server #2264 Switch to Licence expression rather than file

Bug fixesedit

#2267 Cleanup of packages thanks to Framework reference #2274 Limit memory usage when capturing SOAP request bodies #2276 Address a few synchronization issues in the codebase #2277 Truncate unknown keys logging from central config parser #2278 Ensure exposed default constants are readonly #2283 Fix duplicate key errors on dropped span stats update #2279 Remove RegexConverter, not used in serialization from and to apm-server #2280 Cleanup some dead code and one instance of null propagation in tooling NOT userfacing code

1.25.3 - 2024/01/08edit

Bug fixesedit

#2241 TagObjects not guaranteed to be unique #2242 Move logging caching over to ConditionalWeaktable #2247 Add additional logging to outgoing http call propagation #2249 address multiple structured logging violations #2245 Update MongoDB drivers to 2.19.0

1.25.2 - 2023/12/13edit

This release fixes a bug in Elastic.Apm.AspNetCore when using ` UseElasticApm()` not correctly setting status codes. The bug was not present in the more commonly used Elastic.Apm.NetCoreAll since it uses a DiagnosticListener approach. With this release we ensure both packages use the exact same DiagnosticListener mechanism to instrument ASP.NET Core.

Bug fixesedit

#2213 Remove ApmMiddleWare, only use DiagnosticSource listener for ASP.NET Core. #2239 Move StartupHooks over to netstandard2.0.

1.25.1 - 2023/11/21edit

Bug fixesedit

#2213 Prevent server certificate callback runtime exception #2219 Fix duration.sum.us value in JSON #2214 Return total memory when limit is max value. #2220 Ensure baggage gets copied with baggage prefix by

1.25.0 - 2023/10/19edit

Featuresedit

#2196 Support OnExecuteRequestStep available in new .NET versions for IIS modules.

1.24.0 - 2023/09/20edit

Featuresedit

#2140 Enable OpenTelemetryBridge by default #2157 Update and optimise OTel bridge #2147 Add Baggage support #2160 Trace in-process Azure Functions #2165 Internalize SqlClient Instrumentation

Bug fixesedit

#2170 Ensure OpenTelemetryBridge respects Agents sampling decisions #2178 DroppedSpanStats: do not flatten duration #2180 Change cloud.project.id for GCP metadata to be the project-id #2182 Handle SqlExceptions when accessing user claims

1.23.0 - 2023/08/08edit

Featuresedit

#2069 .NET Full Framework now always loads configuration from web or app.config #2103 Add Npgsql 7.x support to profiler #2104 Backend dependencies granularity for NoSQL and Messaging #2067 Send domain name when detected #2136 Log when we detect LegacyAspNetSynchronizationContext

Bug fixesedit

#2126 Fix to not send start stack trace when below configured duration #2109 Agent.Configuration now always points to ConfigurationStore’s configuration #2142 Reduce logging noise for stack frame capturing. #2148 Move Redis Profiler registration to ConditionalWeakTable

1.22.0 - 2023/04/28edit

Featuresedit

  • #2050 Enable listening to Microsoft.Data.SqlClient.EventSource on .NET full framework.

Bug fixesedit

  • #2054 Eager load APM configuration.
  • #2049 Increase logging of profiler if expected rejit target is not found.

1.21.0 - 2023/04/05edit

This release includes two breaking changes that have minimal impact.

  • We removed support for target frameworks which have gone into end-of-life support by Microsoft. The impact should be minimal, however as we continue to support netstandard2.0 and netstandard2.1 where applicable.
  • We removed the collection of GC metrics over ETW on .NET Full Framework. The collection over ETW requires elevated privileges, especially in IIS deployments. This runs counter to best practices. Since these are currently not displayed in the APM UI, while technically breaking, the impact should be minimal. The GC metric collection on modern .NET platforms is not impacted.

Breaking changesedit

  • #2036 Remove ETW powered GC metrics on FullFramework
  • #2027 Remove unsupported TFM’s

Bug fixesedit

  • #2041 Prevent sending activation_method in metadata for 8.7.0

1.20.0 - 2023/02/27edit

Featuresedit

  • #1981 Support for Azure Functions through new Elastic.Apm.Azure.Functions nuget package!
  • #1935 Support new Elasticsearch Client: Elastic.Clients.Elasticsearch
  • #1988 Suppport latest version of Microsoft.Data.SqlClient
  • #1988 Support latest version OracleManagedDataAccess
  • #1983 Loose MSVC redistributable as requirement for the profiler
  • #1983 Add support for sending agent activation method to the server

Bug fixesedit

  • #1999 NullReferenceException in span compression
  • #1970 Improve profiler logging by always enabling agent logging too.
  • #1972 Normalize OpenTelemetry Bridge config section to OpenTelemetryBridgeEnabled
  • #1926 Try to enable TLS 1.2 in all scenarios.
  • #1964 OTel bridge span’s destination service may contain null resource
  • #1961 AppSettings ElasticApm:Enabled is not fully honored in ASP.NET Classic

1.19.0 - 2022/12/05edit

Featuresedit

  • #1867 Improve handling of multiple agent initialization.
  • #1877 Enable CloudMetadataProvider on Azure Functions.
  • #1892 CentralConfig: handle MaxAge header with less than 5 sec according to spec (issue: #1831).
  • #1897 Add basic agent logging preamble.
  • #1907 Publish docker image with agent (issue: #1665).
  • #1917 Add .NET 7 support (issue: #1860).
  • #1930 Improve SOAP action parsing.

Bug fixesedit

  • #1882 Fix transaction trace id not aligned when transaction is created from OTel bridge without parent (issue: #1881).
  • #1905 Avoid NRE during startup hook init (issue: #1904).
  • #1927 Avoid panic in file-logging setup (issue: #1918).
  • #1922 Use Span timing instead of cumulative SqlCommand statistics (issue: #1869).
  • #1933 Enable DOTNET_STARTUP_HOOKS for .NET 7 (issue: #1900).

1.18.0 - 2022/10/13edit

Featuresedit

  • Profiler based agent is now GA
  • #1806 Capture request body in ASP.NET Full Framework (issue: #379).
  • #1832 UseWindowsCredentials: new configuration to force the agent to use the credentials of the authenticated Windows user when events are sent to the APM Server (issue: #1825).

Bug fixesedit

  • #1800 Fix incorrect transaction name in ASP.NET Web Api (issue: #1637).
  • #1803 and #1804 Fix potential NullReferenceException in TraceContinuationStrategy implementation (issue: #1802).
  • #1780 Fix container ID parsing in AWS ECS/Fargate environments (issue: #1779).
  • #1814 Use correct default value for ExitSpanMinDuration (issue: #1789).
  • #1811 Fixed crashes on some SOAP 1.2 requests when using GetBufferedInputStream (issue: #1759).
  • #1816 Group MetricSets in BreakdownMetricsProvider (issue: #1678).

1.17.0 - 2022/08/24edit

Featuresedit

  • #1739 Introduce the TraceContinuationStrategy config (issue: #1637).
  • #1749 Span Links with Azure ServiceBus (issue: #1638).
  • #1765 Improve db granularity (issue: #1664).
  • #1795 Add config option span_stack_trace_min_duration (issue: #1529).

Bug fixesedit

  • #1746 Fix default for the ApplicationNamespaces config.
  • #1755 Flow SynchronizationContext across public API calls (issue: #1660).
  • #1753 PayloadSender threading improvements (issue: #1571).
  • #1773 Include Accept header on APM server info call (caused errors when reading APM Server info) (issue: #1624).
  • #1781 Significantly improved the performance of database query parsing (issue: #1763).
  • #1787 Fix FillApmServerInfo : Invalid ElasticApm_ApiKey throws Exception (issue: #1735).

1.16.1 - 2022/06/15edit

Featuresedit

  • #1732 Improved logging around fetching central configuration (issue: #1626).

Bug fixesedit

  • #1710 Crash during assembly loading with the profiler based agent (issue: #1705).
  • Handling RouteData with null in legacy ASP.NET Core 2.2 apps (issue: #1729).

1.16.0 - 2022/06/02edit

Featuresedit
  • #1726 Automatic capturing of incoming HTTP Requests on ASP.NET Core with the Profiler based agent (issue: #1610).

Bug fixesedit

  • #1725 By disabling system.cpu.total.norm.pct, the agent won’t create any instance of the PerformanceCounter type (workaround for issue: #1724)
  • #1723 Transaction names for incoming HTTP requests returning 404 but matching a valid route, will include the URL path instead of using unknown route (issue: #1715).

1.15.0 - 2022/05/12edit

Featuresedit
  • #1657 Improved database span names based on parsed SQL statements (issue: #242)
Bug fixesedit
  • #1670 Dedicated working loop thread for sending APM events (issue: #1571)
  • #1677 Fixed span type for MongoDB - with this a MongoDB logo will show up on the service map
  • #1674 InvalidCastException in AspNetCoreDiagnosticListener
  • #1683 MVC: handling area:null when creating transaction name based on routing
  • #1685 Handle missing .Stop events in AspNetCoreDiagnosticListener (issue: #1676)

1.14.1 - 2022/03/10edit

Bug fixesedit
  • #1634 Make sure events are sent after APM Server timeout (bug report: #1630)
  • #1639 Error on composite span validation (bug report: #1631))
  • #1648 OpenTelemetry (Activity) bridge - APM Server version check

1.14.0 - 2022/02/09edit

Featuresedit
  • #1620 Span compression and dropping fast exit spans. New settings: ExitSpanMinDuration, SpanCompressionEnabled, SpanCompressionExactMatchMaxDuration, SpanCompressionSameKindMaxDuration (issues: #1329 and #1475)
  • #1611 NpgSql 6.x support (issue: #1602)
  • #1589 Capture transaction name on errors (issue: #1574)
Bug fixesedit
  • #1603 .NET 6 support with startup hook (issue: #1590)
Breaking changesedit
  • #1586 Change unknown service.name to align with other agents. In the very rare cases when the agent is not able to autoamtically detect the name of a service, or it’s not manually set, it’ll use the default service name unknown-dotnet-service. In prior versions this was just unknown. (issue: #1585)

1.13.0 - 2022/01/12edit

Featuresedit
  • #1498 OpenTelemetry Bridge - integration with System.Diagnostics.Activity - Beta (issue: #1521)

1.12.1edit

Bug fixesedit
  • #1564 Failed sending event error with missing span.context.destination.service.name required field on older APM Servers (issue: #1563)

1.12.0edit

Breaking changesedit
  • #1520 Auto-infer destination.service.resource and adapt public API (issues: #1330)

    boolean isExitSpan parameter introduced to Start* and Capture* public APIs to denote when a span is an exit span.

Featuresedit
  • #1511 Implement Dropped span statistics
  • #1515 Ignore duplicate Diagnostic listener subscriptions (issue: #1119)
  • #1518 Implement User-Agent spec for .NET agent (issue: #1517)
  • #1525 Add message related properties to transactions and spans (issue: #1512)
  • #1534 Add profiler auto instrumentation (issue: #1522)
  • #1548 Add profiler auto instrumentation for RabbitMQ (issue: #1223)
  • #1528 Platform detection: Handle .NET 6 (issue: #1513)
  • #1492 Remove use of Socket.Encrypted to determine secure
  • #1520 Auto-infer destination.service.resource and adapt public API (issues: #1330)
  • #1540 Stop recording transaction metrics (issue: #1523)
Bug fixesedit
  • #1484 Capture spans for new Azure Storage SDKs (issue: #1352)
  • #1509 Use Environment.MachineName to get HostName (issue: #1504)
  • #1510 Check context is not null when sanitizing error request headers (issue: #1503)
  • #1536 Improve Performance counter handling for metrics on Windows (issue: #1505)
  • #1538 Collect .NET Framework GC metrics only when filtering supported (issue: #1346)
  • #1557 Handle enabled/recording=false configuration when capturing errors

1.11.1edit

Featuresedit
  • #1354 Serialize to writer directly
  • #1356 Better logging in PayloadSenderV2 on task cancellation
  • #1358 Propagate Trace context in exit spans (issues: #1350, #1344)
  • #1374 Get Command and Key for StackExchange.Redis spans (issue: #1364)
  • #1474 Add CosmosDB integration to NetCoreAll
  • #1368 Use 10K limit for CaptureBody similar to the Java agent (issue: #1359)
Bug fixesedit
  • #1362 Unset parentId if TraceContextIgnoreSampledFalse is active
  • #1367 Make sure BreakdownMetricsProvider prints 1K warning only once per collection (issue: #1361)
  • #1471 Sanitize Central config request URI and headers in logs (issue: #1376)
  • #1472 Honor Transaction.Outcome set by public API in auto instrumentation (issue: #1349)
  • #1481 Use Kubernetes pod id determined from cgroup file

1.11.0edit

Featuresedit
  • #1342 CosmosDb support (issue: #1154)
  • #1271 Support "Time spent by span type" (aka Breakdown metrics) (issue: #227)
  • #1302 Prefer W3C traceparent over elastic-apm-traceparent
  • #1310 Add TraceContextIgnoreSampledFalse config setting
  • #1331 Create transactions for Azure Service Bus Processors (issue: #1321)

1.10.0edit

Featuresedit
  • #1225 Add instrumentation for Azure Service Bus (issue: #1157)
  • #1247 Add Azure storage integration (issues: #1156 and #1155)
  • #1241 Internalize Newtonsoft.Json - no more dependency on Newtonsoft.Json
  • #1275 Internalize Ben.Demystifier - no more dependency on Ben.Demystifier (issue: #1232)
  • #1215 Add MongoDb support (issue: #1158)
  • #1277 Capture inner exceptions (issue: #1267)
  • #1290 Add configured hostname (issue: #1289)
  • #1288 Use TraceLogger as default logger in ASP.NET Full Framework (issue: #1263)
Bug fixesedit
  • #1252 Fix issue around setting Recording to false (issue: #1250)
  • #1259 ASP.NET: Move error capturing to Error event handler
  • #1305 Use Logger to log exception in AgentComponents initialization (issue: #1254)
  • #1311 Fix NullReferenceException in Elastic.Apm.Extensions.Logging(issue: #1309)
Breaking changesedit
  • #1306 Do not capture HTTP child spans for Elasticsearch (issue: #1276)

1.9.0edit

Featuresedit
  • #925 Add GC time (issue: #922)
  • #1147 Propagate sample rate through tracestate (issue: #1021)
Bug fixesedit
  • #1189 Get transaction name from Web API controller route template
Breaking changesedit
  • #1161 and #1162 The agent tries to never throw any exception. Specifically instead of throwing InstanceAlreadyCreatedException, it will print an error log.

1.8.1edit

Featuresedit
  • #1196 Add GC Heap Stats capturing for .NET 5.0 (issue: #1195)
Bug fixesedit
  • #1192 Lazily access the agent in ElasticApmProfiler redis integration (issue: #1190)
  • #1198 Add TargetFramework NET5.0 to Elastic.Apm.AspNetCore and related packages (issue: #1194)

1.8.0edit

Featuresedit
  • #1063 Add support for capturing redis commands from StackExchange.Redis (documentation) (issue: #874)
  • #1065 Introduce ServerUrl config - (ServerUrls is still working but will be removed in the future) (issue: #1035)
  • #1048 Support for more k8s cgroup path patterns (issue: #968)
  • #1082 SanitizeFieldNames config became changeable though Kibana central configuration
  • #1083 Azure App Service cloud metadata collection
  • #1135 Capture error logs as APM errors from Microsoft.Extensions.Logging automatically and extend the Public API to capture custom logs as APM errors (issue: #894)
  • #1096 Support changing log level through Kibana central configuration and support "off" level (issue: #970)
Bug fixesedit
  • #1081 NullReferenceException with disabled agent on Transaction.Custom (issue: #1080)
  • #1078 ASP.NET Core, enabled=false in appsettings.json does not disable public Agent API (issue: #1077)
  • #1115 System.IO.IOException on ASP.NET Classic (issue: #1113)
  • #1118 Memory issue with gRPC (issue: #1116)
  • #1124 Ensuring ETW sessions are terminated on agent shutdown (issue: #897)
  • #1109 NullReferenceException with custom IConfigurationReader implementation in MetricsCollector
  • #1138 and #1165 Fixes around zero code change agent setup with DOTNET_STARTUP_HOOKS
  • #1115 Access Request.InputStream only when SOAP header present (issue: #1113)

1.7.1edit

Featuresedit
  • #1057 Introduce GetLabel<T> method on IExecutionSegment (issue: #1033)
Bug fixesedit
  • #1052 Increased transaction duration due to stack trace capturing (issue: #1039)
  • #1053 Warning with Synchronous operations are disallowed on ASP.NET Core during request body capturing (issue: #1044)
  • #1042 SqlClient instrumentation on .NET 5 (issue: #1025)
  • #1060 UseAllElasticApm with IHostBuilder missing auto instrumentation (issue: #1059)

1.7.0edit

Featuresedit
  • #828 Agent loading with zero code change on .NET Core (issue: #71)
  • #969 gRPC support (issue: #478)
  • #974 Add ability to configure Hostname (issue: #932)
  • #997 Add Enabled and Recording configuration (issue: #122)
  • #912 Add FullFrameworkConfigurationReaderType config to load custom configuration reader on ASP.NET
  • #978 Capture User id and email on ASP.NET (issue: #540)
  • #982 Support boolean and numeric labels in addition to string labels (issues: #967, #788, #473, #191, #788, #473, #191)
  • #1000 Collecting metrics based on cGroup (issue: #937)
  • #1002 ITransaction.SetService API to support multiple services in a single process (issue: #1001)
  • #1003 Collecting cloud metadata (supporting AWS, Azure, GCP) (issue: #918)
  • #973 Transaction grouping on ASP.NET (issue: #201)
  • #913 Entity Framework 6 support on .NET Core (issue: #902)
Bug fixesedit
  • #992 On ASP.NET Core CurrentTransaction is null in some cases (issues: #934, #972)
  • #971 Avoid double initialization in HostBuilderExtensions
  • #999 Capture body with large file error (issue: #960)
Breaking changesedit
  • Binary compatibility on IExecutionSegment.CaptureException and IExecutionSegment.CaptureError with libraries depending on previous version. If this happens you need to update Elastic.Apm to 1.7.0 in your projects (Issue: (#1067)

1.6.1edit

Bug fixesedit
  • Service map: missing connection between .NET services (#909)

1.6.0edit

Featuresedit
  • Elasticsearch client instrumentation #329
  • Introducing Elastic.Apm.Extensions.Hosting package with an extension method on IHostBuilder #537
  • Stack trace improvements: async call stack demystification (#847) and showing frames from user code for outgoing HTTP calls (#845)
  • Making fields on IError public #847
  • Service map improvements: #893
Bug fixesedit
  • Missing traces from the Kibana traces list due to setting Transaction.ParentId to an Activity #888
  • Exception around runtime detection #859
  • Missing outgoing HTTP calls in .NET Framework applications and causing memory issues #896

1.5.1edit

Bug fixesedit
  • Memory issue in SqlEventListener #851

1.5.0edit

Featuresedit
  • Auto instrumentation for SqlClient (documentation)
  • Introducing Filter API #792 (documentation)
  • Auto-detect culprit for exceptions #740
  • New config settings: ExcludedNamespaces, ApplicationNamespaces (documentation)
  • Keep Activity.Current.TraceId in sync with the Trace ID used by the agent #800
  • Report Kubernetes system metadata #741
Bug fixesedit
  • Database connection string parsing issue with Oracle #795

1.4.0edit

Featuresedit
  • Introducing ITransaction.EnsureParentId() to integrate with RUM in dynamically loaded HTML pages (including page loads in ASP.NET Core) #771
  • New config setting: ApiKey #733
Bug fixesedit
  • Memory issue in .NET Full Framework with default metrics turned on #750
  • Parsing for Oracle connection strings #749
  • StackOverflowException when using the Elastic.Apm.SerilogEnricher package and the log level is set to Verbose #753
Breaking changesedit
  • We have some changes that are technically breaking changes. We made some helper classes internal that were never meant to be public. These are: Elastic.Apm.Helpers.AgentTimeInstant, Elastic.Apm.Helpers.ContractExtensions, Elastic.Apm.Helpers.ObjectExtensions, Elastic.Apm.Helpers.ToStringBuilder. None of these classes were documented or mentioned as part of the Public Agent API. We expect no usage of these classes outside the agent.

1.3.1edit

Bug fixesedit
  • Fix log spamming issues #736, #738
  • Fix turning HTTP 415 responses in ASP.NET Core to HTTP 500 when request body capturing is active #739
  • Fix disabling GC metrics collection in case no GC is triggered during the first "5*MetricsInterval" of the process #745

1.3.0edit

Featuresedit
  • New GC metrics: clr.gc.count, clr.gc.gen[X]size, where [X]: heap generation #697
  • Capturing SOAP action name as part of the transaction name #683
  • New config options: ServiceNodeName, VerifyServerCert, DisableMetrics, UseElasticTraceparentHeader (docs)
  • Full W3C TraceContext support #717
Bug fixesedit
  • Fix transaction name generation in ASP.NET Core 3.x #647
  • Fix around HTTP request body sanitization #712

1.2.0edit

Featuresedit
  • Entity framework support with Interceptor (docs)
  • Sanitization of HTTP headers and request body (docs)
  • Central configuration - 2 new configs: CAPTURE_BODY and TRANSACTION_MAX_SPANS. #577.
  • Support for global labels (docs)
  • Custom context (docs)
  • Dropping support for ASP.NET Core 2.0 (which is already end of life) (docs)
Bug fixesedit
  • De-dotting labels. #583.
  • Request body capturing TypeLoadException in ASP.NET Core 3.0. #604.
  • Metrics collection: filtering NaN and Infinity. #589.

1.1.2edit

Bug fixesedit
  • Capturing request body with ASP.NET Core erased the body in some scenarios #539.
  • Integration with Serilog caused missing logs and diagnostic traces with NullReferenceException #544, #545.

1.1.1edit

Featuresedit

Configure transaction max spans. #472

Bug fixesedit

Fixing missing "Date Modified" field on the files from the 1.1.0 packages causing an error while executing dotnet pack or nuget pack on a project with Elastic APM Agent packages. #527

1.1.0edit

Featuresedit
  • ASP.NET Support, documentation can be found here
  • Central configuration (Beta)
Bug fixesedit
  • Addressed some performance issues #359
  • Improved error handling in ASP.NET Core #512
  • Fix for mono #164

1.0.1edit

Bug fixesedit
  • NullReferenceException on .NET Framework with outgoing HTTP calls created with HttpClient in case the response code is HTTP3xx #450
  • Added missing net461 target to the Elastic.Apm package
  • Handling Labels with null #429
Featuresedit
  • Reading request body in ASP.NET Core. Also introduced two new settings: CaptureBody and CaptureBodyContentTypes. By default this feature is turned off, this is an opt-in feature and can be turned on with the CaptureBody setting. #402

1.0.0 GAedit

The 1. GA release of the Elastic APM .NET Agent. Stabilization of the 1.0.0-beta feature for production usage.

Featuresedit
  • Out of the box integration with ILoggerFactory and the logging infrastructure in ASP.NET Core #249
  • Introduced StackTraceLimit and SpanFramesMinDurationInMilliseconds configs #374
  • The Public Agent API now support Elastic.Apm.Agent.Tracer.CurrentSpan #391
Bug fixesedit
  • Thread safety for some bookkeeping around spans #394
  • Auto instrumentation automatically creates sub-spans in case a span is already active #391
Breaking changesedit

We have some breaking changes in this release. We wanted to do these changes prior to our GA release and with this we hopefully avoid breaking changes in the upcoming versions.

  • For better naming we replaced the Elastic.Apm.All packages with Elastic.Apm.NetCoreAll #371
  • Based on feedback we also renamed the UseElasticApm() method in the Elastic.Apm.NetCoreAll package to UseAllElasticApm - this method turns on every component of the Agent for ASP.NET Core. #371
  • Our logger abstraction, specifically the IApmLogger interface changed: #389
  • To follow the Elastic Common Schema (ECS), we renamed our Tags properties to Labels. #416