Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[repo] Clean up unused variables #6100

Merged
merged 3 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions examples/GrpcService/Services/GreeterService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ namespace Examples.GrpcService;

public class GreeterService : Greeter.GreeterBase
{
private readonly ILogger<GreeterService> logger;

public GreeterService(ILogger<GreeterService> logger)
{
this.logger = logger;
}

public override Task<HelloReply> SayHello(HelloRequest request, ServerCallContext context)
{
return Task.FromResult(new HelloReply
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ namespace WebApi.Controllers;
[Route("[controller]")]
public class SendMessageController : ControllerBase
{
private readonly ILogger<SendMessageController> logger;
private readonly MessageSender messageSender;

public SendMessageController(ILogger<SendMessageController> logger, MessageSender messageSender)
public SendMessageController(MessageSender messageSender)
{
this.logger = logger;
SimonCropp marked this conversation as resolved.
Show resolved Hide resolved
this.messageSender = messageSender;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,6 @@ public void EnumerateTags(Activity activity)

private struct EventEnumerationState
{
public bool Created;

public PooledList<ZipkinAnnotation> Annotations;

public void EnumerateEvents(Activity activity)
Expand All @@ -257,7 +255,6 @@ public void EnumerateEvents(Activity activity)
if (enumerator.MoveNext())
{
this.Annotations = PooledList<ZipkinAnnotation>.Create();
this.Created = true;

do
{
Expand Down
2 changes: 0 additions & 2 deletions test/OpenTelemetry.Tests/Trace/SamplersTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ public class SamplersTest
{
private static readonly ActivityKind ActivityKindServer = ActivityKind.Server;
private readonly ActivityTraceId traceId;
private readonly ActivitySpanId spanId;
private readonly ActivitySpanId parentSpanId;

public SamplersTest()
{
this.traceId = ActivityTraceId.CreateRandom();
this.spanId = ActivitySpanId.CreateRandom();
this.parentSpanId = ActivitySpanId.CreateRandom();
}

Expand Down
Loading