Skip to content

Commit

Permalink
Add missing headers
Browse files Browse the repository at this point in the history
  • Loading branch information
twenzel committed Jan 21, 2022
1 parent 3ca132b commit 7381f48
Show file tree
Hide file tree
Showing 9 changed files with 98 additions and 39 deletions.
19 changes: 8 additions & 11 deletions src/OpenTelemetry.Contrib.EventCounterListener/EventCounter.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// <copyright file="MySqlDataInstrumentationOptions.cs" company="OpenTelemetry Authors">
// <copyright file="EventCounter.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -14,24 +14,21 @@
// limitations under the License.
// </copyright>

using System;
using System.Collections.Concurrent;
using System.Data;
using System.Diagnostics;
using System.Text.RegularExpressions;

using OpenTelemetry.Trace;

namespace OpenTelemetry.Contrib.Instrumentation.EventCounterListener
{

/// <summary>
/// The Event Counter to listen to
/// The Event Counter to listen to.
/// </summary>
public class EventCounter
{
/// <summary>
/// Gets or sets the name of the event counter.
/// </summary>
public string Name { get; set; }

/// <summary>
/// Gets or sets the type of the event counter.
/// </summary>
public string Type { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
using System;
// <copyright file="EventCounterListener.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>

using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics.Metrics;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// <copyright file="MySqlDataInstrumentationEventSource.cs" company="OpenTelemetry Authors">
// <copyright file="EventCounterListenerEventSource.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -29,7 +29,7 @@ internal class EventCounterListenerEventSource : EventSource
[Event(2, Message = "Error accured while processing eventCounter, EventCounter: {0}, Exception: {2}", Level = EventLevel.Error)]
public void ErrorEventCounter(string counterName, string exception)
{
this.WriteEvent(1, counterName, exception);
this.WriteEvent(1, counterName, exception);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
// <copyright file="EventCounterListenerInstrumentation.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>

using System;

namespace OpenTelemetry.Contrib.Instrumentation.EventCounterListener
{
internal class EventCounterListenerInstrumentation : IDisposable
{

private readonly EventCounterListener eventCounterListener;

public EventCounterListenerInstrumentation(EventCounterListenerOptions options)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// <copyright file="MySqlDataInstrumentationOptions.cs" company="OpenTelemetry Authors">
// <copyright file="EventCounterListenerOptions.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -14,14 +14,6 @@
// limitations under the License.
// </copyright>

using System;
using System.Collections.Concurrent;
using System.Data;
using System.Diagnostics;
using System.Text.RegularExpressions;

using OpenTelemetry.Trace;

namespace OpenTelemetry.Contrib.Instrumentation.EventCounterListener
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
using System;
using System.Collections.Generic;
using System.Text;
// <copyright file="CounterPayload.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>

using System;

namespace OpenTelemetry.Contrib.EventCounterListener.EventPipe
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
using System;
using System.Collections.Generic;
using System.Text;
// <copyright file="ICounterPayload.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>

using System;

namespace OpenTelemetry.Contrib.EventCounterListener.EventPipe
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
using System;
// <copyright file="TraceEventExtensions.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>

using System;
using System.Collections.Generic;
using System.Diagnostics.Tracing;
using System.Text;
using Microsoft.Diagnostics.Tracing;

namespace OpenTelemetry.Contrib.EventCounterListener.EventPipe
{
Expand Down Expand Up @@ -33,7 +47,7 @@ public static bool TryGetCounterPayload(this EventWrittenEventArgs eventArgs, /*
//for _all_ the counters changes the Series to be the lowest specified interval, on a per provider basis.
//Currently the CounterFilter will remove any data whose Series doesn't match the requested interval.

//Do filtering somewhere else -- hananiel
//Do filtering somewhere else -- hananiel
//if (!filter.IsIncluded(traceEvent.ProviderName, counterName, GetInterval(series)))
//{
// return false;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// <copyright file="TracerProviderBuilderExtensions.cs" company="OpenTelemetry Authors">
// <copyright file="MeterProviderBuilderExtensions.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down

0 comments on commit 7381f48

Please sign in to comment.