Skip to content

Commit 2df0cd9

Browse files
committed
alternative to internalsentrysdk
1 parent ba8eebd commit 2df0cd9

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

src/Sentry/InternalSentrySdk.cs

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/Sentry/Sentry.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,14 @@
1616

1717
<PropertyGroup Condition="'$(SolutionName)' == 'Sentry.Unity'">
1818
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
19+
<!-- To be able to make the internals visible, since we're not signing the assembly for Unity -->
20+
<SignAssembly>false</SignAssembly>
1921
</PropertyGroup>
2022

23+
<ItemGroup Condition="'$(SolutionName)' == 'Sentry.Unity'">
24+
<InternalsVisibleTo Include="Sentry.Unity" />
25+
</ItemGroup>
26+
2127
<!-- Platform-specific props included here -->
2228
<Import Project="Platforms\Android\Sentry.Android.props" Condition="'$(TargetPlatformIdentifier)' == 'android'" />
2329
<Import Project="Platforms\Cocoa\Sentry.Cocoa.props" Condition="'$(TargetPlatformIdentifier)' == 'ios' Or '$(TargetPlatformIdentifier)' == 'maccatalyst'" />

src/Sentry/SentrySdk.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,13 @@ internal static IDisposable UseHub(IHub hub)
209209
return new DisposeHandle(hub);
210210
}
211211

212+
/// <summary>
213+
/// Allows to set the trace
214+
/// </summary>
215+
internal static void SetTrace(SentryId traceId, SpanId parentSpanId) =>
216+
CurrentHub.ConfigureScope(scope =>
217+
scope.SetPropagationContext(new SentryPropagationContext(traceId, parentSpanId)));
218+
212219
/// <summary>
213220
/// Flushes the queue of captured events until the timeout set in <see cref="SentryOptions.FlushTimeout"/>
214221
/// is reached.

0 commit comments

Comments
 (0)