Skip to content

Commit

Permalink
Attempt to fix CI
Browse files Browse the repository at this point in the history
Includes some whitespace formatting fixes
  • Loading branch information
stevejgordon committed Nov 13, 2024
1 parent 7995fc1 commit a1bf345
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 36 deletions.
4 changes: 2 additions & 2 deletions examples/Example.AutoInstrumentation/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ ARG TARGETARCH
ARG TARGETVARIANT
WORKDIR /app
COPY --from=publish_example /app/example /app/example
COPY --from=build_distro /work/.artifacts/bin/Elastic.OpenTelemetry/release_netstandard2.1/Elastic.OpenTelemetry.dll /app/otel/net/
COPY --from=build_distro /work/.artifacts/bin/Elastic.OpenTelemetry/release_netstandard2.1/Elastic.OpenTelemetry.pdb /app/otel/net/
COPY --from=build_distro /work/.artifacts/bin/Elastic.OpenTelemetry/release_net8.0/Elastic.OpenTelemetry.dll /app/otel/net/
COPY --from=build_distro /work/.artifacts/bin/Elastic.OpenTelemetry/release_net8.0/Elastic.OpenTelemetry.pdb /app/otel/net/

ENV CORECLR_ENABLE_PROFILING="1"
ENV CORECLR_PROFILER="{918728DD-259F-4A6A-AC2B-B85E1B658318}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework> <!-- Can't update to 9.0 yet as the autoinstrumentation store doesn't yet include a net9.0 directory -->
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<!-- Can't update to 9.0 yet as the autoinstrumentation store doesn't yet include a net9.0 directory -->
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup>

<ItemGroup>
<Content Include="..\..\.dockerignore">
<Link>.dockerignore</Link>
</Content>
</ItemGroup>
<ItemGroup>
<Content Include="..\..\.dockerignore">
<Link>.dockerignore</Link>
</Content>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net462;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>True</IsPackable>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>net462;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>True</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="OpenTelemetry.AutoInstrumentation" Version="1.9.0" GeneratePathProperty="true" PrivateAssets="contentfiles" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="OpenTelemetry.AutoInstrumentation" Version="1.9.0" GeneratePathProperty="true" PrivateAssets="contentfiles" />
</ItemGroup>

<ItemGroup>
<Content Remove="README.md" />
Expand All @@ -23,23 +23,21 @@

<!-- ensure we remove the linked instrument.sh from base OpenTelemetry.AutoInstrumentation
and link it as _instrument.sh since we manually copy it over in the prebuild event -->

<Content Update="instrument.sh" CopyToPublishDirectory="Never" CopyToOutputDirectory="Never" />
<Content Remove="instrument.sh" />
<Content Include="_instrument.sh" CopyToOutputDirectory="Always" CopyToPublishDirectory="Always" Pack="True" PackagePath="contentFiles/any/any/_instrument.sh" />
<Content Include="instrument.sh" CopyToOutputDirectory="Always" CopyToPublishDirectory="Always" Pack="True" PackagePath="contentFiles/any/any/instrument.sh" />

<Content Include="instrument.props" CopyToOutputDirectory="Always" CopyToPublishDirectory="Always" Pack="True" PackagePath="build/elastic.opentelemetry.autoinstrumentation.props" />

</ItemGroup>

<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<!-- Copies the content files manually as physical files in the source repository -->
<!-- we manually repackage these as contentfiles (albeit renamed) -->
<!-- we manually repackage these as contentfiles (albeit renamed) -->
<Copy SourceFiles="$(PkgOpenTelemetry_AutoInstrumentation)/contentFiles/any/any/instrument.cmd" DestinationFiles="$(MSBuildThisFileDirectory)/_instrument.cmd" />
<Copy SourceFiles="$(PkgOpenTelemetry_AutoInstrumentation)/contentFiles/any/any/instrument.sh" DestinationFiles="$(MSBuildThisFileDirectory)/_instrument.sh" />
</Target>

<ItemGroup>
<ProjectReference Include="..\Elastic.OpenTelemetry\Elastic.OpenTelemetry.csproj" />
</ItemGroup>
Expand Down
9 changes: 2 additions & 7 deletions src/Elastic.OpenTelemetry/ElasticOpenTelemetryBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

using System.Diagnostics;
using System.Diagnostics.Tracing;
using System.Reflection;
using Elastic.OpenTelemetry.Configuration;
using Elastic.OpenTelemetry.Diagnostics;
using Elastic.OpenTelemetry.Diagnostics.Logging;
Expand All @@ -16,9 +15,6 @@
using Microsoft.Extensions.Logging;
using OpenTelemetry;
using OpenTelemetry.Logs;
using OpenTelemetry.Metrics;
using OpenTelemetry.Trace;
using static Elastic.OpenTelemetry.Configuration.ElasticOpenTelemetryOptions;

namespace Elastic.OpenTelemetry;

Expand Down Expand Up @@ -169,10 +165,9 @@ internal static partial class LoggerMessages
[LoggerMessage(EventId = 2, Level = LogLevel.Information, Message = "No Elastic defaults were enabled.")]
public static partial void LogNoElasticDefaults(this ILogger logger);

[LoggerMessage(EventId = 1, Level = LogLevel.Information, Message = "ElasticOpenTelemetryBuilder {Signal} skipped, configured to be disabled")]
[LoggerMessage(EventId = 3, Level = LogLevel.Information, Message = "ElasticOpenTelemetryBuilder {Signal} skipped, configured to be disabled")]
public static partial void LogSignalDisabled(this ILogger logger, string signal);

[LoggerMessage(EventId = 1, Level = LogLevel.Information, Message = "Elastic defaults for {Signal} skipped, configured to be disabled")]
[LoggerMessage(EventId = 4, Level = LogLevel.Information, Message = "Elastic defaults for {Signal} skipped, configured to be disabled")]
public static partial void LogDefaultsDisabled(this ILogger logger, string signal);

}

0 comments on commit a1bf345

Please sign in to comment.