Getting Fastly service ID in VCL

Comments

2 comments

  • Cassandra Dixon

    The variable req.service_id will return the Fastly service_id. For instance, if you are using a custom logging format in your vcl, you can set the call to your format:

    log {"syslog "}req.service_id{" my_logging_endpoint_name :: "} You can then use the same vcl within different services.

    0
    Comment actions Permalink
  • markwainwright

    @cassandra Brilliant, thanks! I looked everywhere for that and couldn't find it.

    0
    Comment actions Permalink

Please sign in to leave a comment.