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

ExceptionlessTarget - ApiKey and ServerUrl and Message and UserIdentity with Layout support #299

Merged
merged 4 commits into from
Apr 18, 2023

Conversation

snakefoot
Copy link
Contributor

@snakefoot snakefoot commented Apr 15, 2023

Resolves #297 and resolves #296

    <target type="Exceptionless, Exceptionless.NLog" name="exceptionless"
            apiKey="API_KEY_HERE"
            userIdentity="${aspnet-user-identity}"
            userIdentityName="${aspnet-user-claim:ClaimTypes.Name}">
      <field name="host" layout="${hostname}" />
      <field name="process" layout="${processname}" />
      <field name="user" layout="${environment-user}" />
    </target>

${aspnet-user-identity} comes from NLog.Web.AspNetCore-nuget-package . See also: https://nlog-project.org/config/?tab=layout-renderers

@CLAassistant
Copy link

CLAassistant commented Apr 15, 2023

CLA assistant check
All committers have signed the CLA.

@snakefoot snakefoot changed the title ExceptionlessTarget - ApiKey and ServerUrl and Message and ReferenceId with Layout support ExceptionlessTarget - ApiKey and ServerUrl and Message and UserIdentity and ReferenceId with Layout support Apr 15, 2023
Copy link
Member

@niemyjski niemyjski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a comment. I don't think we can use reference id's like this because they will be discarded events server side as each event needs to be unique, can you please confirm.

@snakefoot snakefoot changed the title ExceptionlessTarget - ApiKey and ServerUrl and Message and UserIdentity and ReferenceId with Layout support ExceptionlessTarget - ApiKey and ServerUrl and Message and UserIdentity with Layout support Apr 17, 2023
@niemyjski
Copy link
Member

I left a comment. I don't think we can use reference id's like this because they will be discarded events server side as each event needs to be unique, can you please confirm.

@ejsmith may want to consider bringing correlation id in as it may help track down issues in otel. I'm not sure how well our event references we store in extended data for this scenario would help.

Copy link
Member

@niemyjski niemyjski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, had a question about target changes

src/Platforms/Exceptionless.NLog/ExceptionlessTarget.cs Outdated Show resolved Hide resolved
src/Platforms/Exceptionless.NLog/readme.txt Outdated Show resolved Hide resolved
@niemyjski
Copy link
Member

Thanks for the PR!!!!!!

@niemyjski niemyjski closed this Apr 18, 2023
@niemyjski niemyjski reopened this Apr 18, 2023
@niemyjski niemyjski merged commit b7cdc10 into exceptionless:main Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Update NLog ExceptionlessTarget to use Layout for ApiKey and ServerUrl NLog: How can I send user identity?
4 participants