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

Pre-Defined Custom Trace Profiles #1177

Closed
kelltrick opened this issue Dec 1, 2021 · 1 comment
Closed

Pre-Defined Custom Trace Profiles #1177

kelltrick opened this issue Dec 1, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@kelltrick
Copy link
Contributor

kelltrick commented Dec 1, 2021

Pre-Defined Custom Trace Profiles

The goal of this feature is to allow users to define more complex trace profiles in confguration and reference them via a string in the GET /trace API.

Design

We will add a new property to RootOptions called TraceProfiles. TraceProfiles will be an JSON object containing strings-to-objects. Each string property name will define a new alias that can be used on the GET /trace API. The object defined under the new alias name will be identical to the existing format for HTTP POST /trace API payload. This will simplify an existing requests as in the examples that follow.

Existing workflow:

Make a call to the /trace API as a POST with the payload containing the trace configuration:

POST /trace?pid=1234
HTTP Payload:
{
    "Providers": [
        {
            "Name": "MyProfiler",
            "EventLevel": "Verbose"
        },
        {
            "Name": "Microsoft-Windows-DotNETRuntime",
            "EventLevel": "Verbose"
        }
    ],
    "BufferSizeInMB": 48
}

New Call:

Import or include the below configuration at startup or after:

{
    "TraceProfiles": {
        "NewAliasName": {
            "Providers": [
                {
                    "Name": "MyProfiler",
                    "EventLevel": "Verbose"
                },
                {
                    "Name": "Microsoft-Windows-DotNETRuntime",
                    "EventLevel": "Verbose"
                }
            ],
            "BufferSizeInMB": 48
        }
    }
}

Make a get request to the /trace API and include the new alias:

GET /trace?pid=1234&profile=NewAliasName

Settings

  • Alias Name (a string): This setting will be the profile name of the new alias. It must be limited to A-Z, a-z, 0-9 and _ in order to be usable as a query string parameter. The values ``
  • Contents (an object): This value will be identical to the values sent in the http body of POST /trace API calls today. The format is defined by the C# object EventPipeConfiguration.
@jander-msft
Copy link
Member

There has not been customer demand for this feature. There is no current plans to implement this as this time.

@jander-msft jander-msft closed this as not planned Won't fix, can't repro, duplicate, stale Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants