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

⭐ [Enhancement]: Extend Application Name #2406

Open
JerryNixon opened this issue Oct 3, 2024 · 3 comments
Open

⭐ [Enhancement]: Extend Application Name #2406

JerryNixon opened this issue Oct 3, 2024 · 3 comments
Assignees
Labels
telemetry feature requests/ bug reports related to telemetry
Milestone

Comments

@JerryNixon
Copy link
Contributor

JerryNixon commented Oct 3, 2024

What is it?

  • Add settings telemetry to application name value.

Repository with working sample solution

Format

dab_oss_1.2.3.4+M11MD0S1MMM0011001

Where M11MD0S1MMM0011001 indicates a one char indicator of a setting value by ordinal.

Which settings

Top level values: ! (error), M (missing). In some cases, like Cache.Enabled, M is not an error - it is just accepting the system default. In other cases, like Runtime.Host.Mode, only [D]evelopment and [P]roduction enums are allowed, any other would result in !.

Ordinal Property Decode
1 data-source-files small-count
2 runtime.rest.enabled boolean
3 runtime.graphql.enabled boolean
4 runtime.graphql.multiple-mutations.create.enabled boolean
5 runtime.host.mode P (Prod), D (Dev)
6 runtime.host.cors.allow-credentials boolean
7 runtime.host.authentication.provider S (StaticWebApp), A (AppService), Z (AzureId), D (Simulator), E (EntraId), O (Oauth), N (None)
8 cache.enabled boolean
9 pagination.max-page-size customized
10 pagination.default-page-size customized
11 runtime.host.max-response-size-mb customized
12 telemetry.application-insights.enabled boolean
13 Entities: count big-count
14 Entities: any use table boolean
15 Entities: any use view boolean
16 Entities: any use stored procedures boolean
17 Entities: any use policies boolean
18 Entities: any use cache boolean

Summary of fields we care about in context.

{
  "data-source-files": [ "file1.json", "file2.json" ], // ordinal 1 (small-count)
  "runtime": {
    "rest": {
      "enabled": true // ordinal 2
    },
    "graphql": {
      "enabled": true // ordinal 3
      "multiple-mutations": {
        "create": {
          "enabled": true // ordinal 4
        }
      }
    },
    "host": {
      "mode": "production" // ordinal 5
      "cors": {
        "allow-credentials": true // ordinal 6
      },
      "authentication": {
        "provider": "StaticWebApps" // ordinal 7
      },
      "max-response-size-mb": 158 // ordinal 11 (customized)
    },
    "cache": {
      "enabled": false // ordinal 8
    },
    "pagination": {
      "max-page-size": 100000 // ordinal 9 (customized)
      "default-page-size": 100 // ordinal 10 (customized)
    },
    "telemetry": {
      "application-insights": {
        "enabled": true // ordinal 12
      }
    }
  },

  "entities": { // ordinal 13 (entities count)
    "ExampleEntity": {
      "source": {
        "type": "view" // ordinal 14/15/16 (entities use table/view/proc)
      }
     "permissions": [
      {
        "policy": "@item.id gt 1" // ordinal 17 (entities use policies)
      },
      "cache": {
        "enabled": true // ordinal 18 (entities use cache)
      }
      ]
    }
  }
}

Decoding

boolean

Character Value
M Missing
0 False
1 True

small-count

Character Count (Exact)
M Missing
! Error
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
Z 10+

big-count

Character Count (Range)
M Missing
! Error
0 01 - 09
1 10 - 19
2 20 - 29
3 30 - 39
4 40 - 49
5 50 - 59
6 60 - 69
7 70 - 79
8 80 - 89
9 90 - 99
A 100 - 199
B 200 - 299
C 300 - 399
C 400 - 499
C 500 - 599
C 600 - 699
C 700 - 799
C 800 - 899
C 900 - 999
Z 1000+

customized

Character Value
M Missing
! Error
D Default
C Custom

Example

M11MD0S1MMM0011001

Ordinal Value Decoded Default
01 M Missing: 'data-source-files' []
02 1 Yes: REST Enabled false
03 1 Yes: GraphQL Enabled false
04 M Missing: 'multiple-mutations.create.enabled' false
05 D Mode: Development production
06 0 No: CORS Creds Not Allowed false
07 S Auth: StaticWebApp None
08 1 Yes: Cache is Globally Enabled false
09 M Missing: 'pagination.max-page-size' 100000
10 M Missing: 'pagination.default-page-size' 100
11 M Missing: 'runtime.host.max-response-size-mb' 158
12 0 No: AI is Disabled false
13 1 There is 1-9 entities 0
14 1 Yes: At least one Entity is Table false
15 1 Yes: At least one Entity View false
16 0 No: No Entity is Stored Proc false
17 0 No: No Entity uses Policies []
18 1 Yes: At least one Entity uses Cache false
@JerryNixon JerryNixon pinned this issue Oct 3, 2024
@abhishekkumams
Copy link
Contributor

abhishekkumams commented Oct 8, 2024

@JerryNixon , can you also add the encoded Application Name for the sample json files in your repository.

@abhishekkumams abhishekkumams added the telemetry feature requests/ bug reports related to telemetry label Oct 8, 2024
@abhishekkumams
Copy link
Contributor

Do we want the decoder to be part of DAB, maybe in the CLI itself which takes in the encoded-value and try to generate the config out of it?

@abhishekkumams
Copy link
Contributor

Original PR for adding Application Name: #1620
this can be referenced to see what files might need change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
telemetry feature requests/ bug reports related to telemetry
Projects
None yet
Development

No branches or pull requests

3 participants